日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

x-shell 通过堡垒机连接 ssh多个机器 自动化脚本

發布時間:2023/12/10 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 x-shell 通过堡垒机连接 ssh多个机器 自动化脚本 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

大家好,我是烤鴨:

1. 連接vpn

這一步就沒什么說的了。我們用的easyconnect。登錄后彈出堡壘機頁面。
easyconnect 官網:https://sslvpn.zjweu.edu.cn/com/installClient.html

2. ?登錄堡壘機賬號

?

登錄堡壘機之后,如圖,點擊ssh鏈接。

?

3. ?用 x-shell 模擬網頁直接登堡壘機


配置地址和用戶名密碼。


4. ?ssh到其他的機器


其實能登錄到堡壘機就已經可以登錄其他的機器了。
如果我們想直接跳到那臺機器,不自己輸入ssh的那些命令。

如圖所示,就按照提示一步步寫登錄腳本就好了。

5. ?貼一下我的登錄腳本


expect?? ??? ??? ??? ??? ??? ??? ??? ??? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?send?
Select server:? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1
Input account:? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? xxxxxx
wanxxxxxxxxin@xx.xxx.xx.35's password:? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?xxx#rfc
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ssh xxxx@xx.xx.xx.47
Are you sure you want to continue connecting (yes/no)?? ? ? ? ? ? ? ? ? ? ? ? ? yes
wanxxxxxxxxin@xx.xx.xx.47's password:? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?xxx#rfc

6. ?貼一下我的數據庫登錄腳本(就是多了登錄mysql的操作)


expect?? ??? ??? ??? ??? ??? ??? ??? ??? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?send?
Select server:? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1
Input account:? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? xxxxxx
wangxxxxxxxin@xx.xxx.xx.35's password:? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?xxx#rfc
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ssh xxxx@xx.xx.xx.47
Are you sure you want to continue connecting (yes/no)?? ? ? ? ? ? ? ? ? ? ? ? ? yes
wangxxxxxxxin@xx.xx.xx.47's password:? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?xxx#rfc
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? mysql -uroot -h 127.0.0.1 -p
Enter password:? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? root1234
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? use database_name;

總結

以上是生活随笔為你收集整理的x-shell 通过堡垒机连接 ssh多个机器 自动化脚本的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。