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

执行前确保 expect 已安装

上一篇 下一篇

猜你喜欢

热点阅读