linux跳板機自動登錄服務器腳本

新建login.sh腳本 腳本內容以下web #!/usr/bin/expect -f set timeout 1 // 超時 等待時間 set pass [lindex $argv 0] // 獲取第一個輸入參數 本人實際使用須要動態密碼 set password xxxxx //靜態密碼 spawn ssh -p22 xxxx@xxxx // 用戶名@跳板機服務器 expect "passw
相關文章
相關標籤/搜索