ssh 连接脚本
2021-01-14 本文已影响0人
iamsea
#!/usr/bin/expect -f
set user your_user_name
set host your_address
set password your_password
set timeout -1
spawn ssh $user@$host
expect "password:*"
send "$password\r"
interact
#!/usr/bin/expect -f
set user your_user_name
set host your_address
set password your_password
set timeout -1
spawn ssh $user@$host
expect "password:*"
send "$password\r"
interact