使用OSX上的iterm 2拆分窗格通过ssh连接到计算机群集。

i2ssh的Python项目详细描述


使用osx上的iTerm 2拆分窗格将ssh连接到计算机群集。

pypibuildstatus

安装

$ pip install i2ssh

用法

$ cat ~/.i2sshrc
---
mycluster:
  hosts:
    - host1.domain.net
    - host2.domain.net
    - host3.domain.net
    - host4.domain.net

$ i2ssh mycluster

命令行参数

$ i2ssh -h
usage: i2ssh [-h] [-c CONFIG] [-v] cluster

positional arguments:
  cluster               the cluster to connect to.

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        the config file to use (default "~/.i2sshrc").
  -v, --verbose         increases log verbosity.
  -l, --list            list the clusters in the config file.

配置文件

---
# the name of the cluster.
mycluster:

  # the command to execute in every pane, defaults to 'ssh'.
  # the hostname for that pane will be appended to the
  # command before being executed, resulting in something
  # like 'ssh host1.domain.net'.
  cmd: 'ssh'

  # the remote user to log into as, defaults to the local user.
  user: 'username'

  # how to split the window, defaults to 'sqrt(n) x (n/cols)'.
  layout: '2x2'

  # position and size for the new window, defaults to
  # maximize within the available space on screen. the format
  # is (x, y, width, height).
  window: '0, 0, 1440, 900'

  # the time to wait between scripting commands, in seconds.
  # defaults to 0.1
  delay: 0.1

  # the list of hosts to execute the command for.
  hosts:
    - host1.domain.net
    - host2.domain.net
    - host3.domain.net
    - host4.domain.net

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
传递Java处理类类型参数的方式的参数   java安卓中间层admob在logcat中导致大量GC_FOR_ALLOC释放消息   java Vert。x Http请求未将参数分配为配置   java中多线程的输出不正确   如何减少java本地线程的冗余   java不完全分块结果   使用OpenCv时java中的Mat数据类型不受支持错误   Java中的正则表达式不工作,而同一正则表达式在shell中工作   java如何从数组中删除元素?   JDBCJava。sql。SQLException:[Microsoft][ODBC Microsoft Access驱动程序]操作必须使用可更新的查询   java如何以对角线打印字符串变量的字符?   SonarQube 5.2的java自定义插件生成NoClassDefFoundError   macos使用Java应用程序打开浏览器选项卡