脚本自动登录ssh
先emerge expect
脚本内容如下
#!/usr/bin/expect --
set timeout 30
spawn ssh username@host
expect "Password:"
send "mypass\r"
interact
参考
http://618119.com/archives/2008/05/10/87.html
脚本内容如下
#!/usr/bin/expect --
set timeout 30
spawn ssh username@host
expect "Password:"
send "mypass\r"
interact
参考
http://618119.com/archives/2008/05/10/87.html