1. 程式人生 > >mac/Linux/centos sshl連接i跳板機,實現類型Xshell 功能

mac/Linux/centos sshl連接i跳板機,實現類型Xshell 功能

參數 users gif img focus oot class tps clone

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提出哈

mac/Linux/centos sshl連接i跳板機,實現類型Xshell 功能