mac/Linux/centos sshl连接i跳板机,实现类型Xshell 功能

1. 由于之前一段时间,公司测试服务器需要有跳板机这种操作,由于mac机器上没有类似Xshell这种程序,所以,只能自己造轮子啦。

本程序采用Shell+Expect脚本编写

具体代码请查看:https://github.com/lonecloud/ssh-tools

使用说明:

  1. 克隆或者下载该项目

git clone https://github.com/lonecloud/ssh-tools.git
  1. 配置ssh.dat

说明一下这几个的参数

  1. 机器类型范围值:0 直接连接机器,1. 跳板机 2.目标机

  2. ssh中的用户名以及IP: eg:username@ip

  3. 密码

配置见:https://github.com/lonecloud/ssh-tools/blob/master/data/ssh.dat

0 root@192.168.209.10 123456
1 root@192.168.209.11 123456
2 root@192.168.209.12 123456
0 root@192.168.209.13 123456

操作指引图片:

直连:

跳板机:

iterm2配置:

 

未待完续,欢迎Fork and star

github地址:https://github.com/lonecloud/ssh-tools

码云地址:https://gitee.com/lonecloud/ssh-tools

 

欢迎大家提出宝贵的意见以及建议,请大家在issue提出哈

猜你喜欢

转载自www.cnblogs.com/lonecloud/p/9942000.html