使用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 Intellij通过方法中的包查找用法   java中VS代码和打包命名的问题   将java CMS功能集成到具有高度动态内容的网站(Lucene/Mysql/Nosql)的策略   oracle的java类强制转换异常。jdbc。驾驶员OracleConnection   字节码向JVM添加上指令   如何在抽象类中执行java方法?   java是否可以在apache访问日志中排除指定的GET参数?(作者:W7开发环境)   java如何获取已安装音频播放器的列表?   尝试向HS学生展示如何使用Java访问MS数据库   使用正则表达式java对给定行中的特定字符串进行计数   java JOOQ Select查询中的Select计数   方法Java,如何从二维双精度数组中找到特定值?   获取图像URL的java正则表达式   java在切换到新的窗口驱动程序后找不到元素