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

 

你可能感兴趣的:(ssh密码登录)