iterm2使用profile功能,ssh登陸

ssh用法

ssh <username>@<host>ssh

ssh -p <port> <username>@<host>spa

腳本

#!/usr/bin/expect -f
set password <password>
set user <username>
set host <host>

set timeout -1

spawn ssh $user@$host
expect "*assword:*"
send "$password\r"
interact
expect eof

腳本保存到某一目錄code

profile

輸入圖片說明

相關文章
相關標籤/搜索