您的位置:首页 > 运维架构 > Linux

linux ssh 自动登录

2014-03-20 09:16 253 查看
#!/usr/bin/expect

set timeout 30

spawn ssh -q user@$argv

expect {

"(yes/no)?" {send "yes\r"; exp_continue}

"password:" {send "xxxxx\r";}

}

interact
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: