ssh密码登录

https://stackoverflow.com/a/16928662/8025086

https://askubuntu.com/a/634789/861079

#!/usr/bin/expect -f
spawn ssh [email protected]
expect "assword:"
send "mypassword\r"
interact
Host Home-raw
    HostName test.com
Host Home
   User netmoon
   Port 22
   ProxyCommand sshpass -pmypass ssh netmoon@%h-raw nc localhost %p

猜你喜欢

转载自www.cnblogs.com/buxizhizhoum/p/12111284.html