0
我想问你关于我的脚本,我不能通过ssh自动登录。如何使用ssh登录远程服务器(槽壳脚本)
set timeout 30
/usr/bin/ssh -p 8484 [email protected]
expect
{
"[email protected] password"
{
send "Passw0rd\r"
}
}
我想问你关于我的脚本,我不能通过ssh自动登录。如何使用ssh登录远程服务器(槽壳脚本)
set timeout 30
/usr/bin/ssh -p 8484 [email protected]
expect
{
"[email protected] password"
{
send "Passw0rd\r"
}
}
spawn
缺少与您的命令:spawn /usr/bin/ssh -p 8484 [email protected]
expect
并不指望{
要上下一行;改为写expect {
。
一个'
似乎缺少:"[email protected]'s password"
你好,你没忘记 “:” 作为密码: – Archemar 2014-09-01 12:54:54
[如何使用ssh在远程计算机上运行shell脚本?](http://stackoverflow.com/questions/305035/how-to-use-ssh-to-run-shell-script-on-一个远程机器) – Kowser 2014-09-01 12:56:23