ssh登录远程主机自动输入密码

#!/usr/bin/expect -f
spawn ssh user@my.server.com
expect "assword:"
send "mypassword\r"
interact
posted @ 2021-10-17 22:11  ssh_alitheia  阅读(596)  评论(0编辑  收藏  举报