http://www.cnblogs.com/wangshiwen/p/9927391.html
使用iTerm2 Profiles快捷登錄ssh(推薦)
找一個目錄創建一個普通文件,例:vim 12.20_prod_aide
編輯一下內容,把自己的信息填寫上去。
#!/usr/bin/expect set PORT 22 set HOST ***.**.12.20 set USER root set PASSWORD ************ spawn ssh -p $PORT $USER@$HOST expect { "yes/no" {send "yes\r";exp_continue;} "*password:*" { send "$PASSWORD\r" } } interact
打開iterm2 -> preferences -> Profiles
點擊下面“+”號,新建一個profile。
選擇Command 在輸入框中輸入
expect+剛才建的文件路徑
此時就設置好了
點擊菜單欄的profiles就可以看見剛才新建的12.20的profiles,選擇就直接登上了遠程服務器。
快捷放肆 command+o ,選擇你設定的profile
分類:
mac