免输入密码,自动登录远程linux服务器
时间:2017-02-17 04:59 来源:linux.it.net.cn 作者:IT
#!/usr/bin/expect
set timeout 30
spawn ssh -l dy 10.0.0.100
expect "password:"
send "mypassword\r"
interact
(责任编辑:IT)
#!/usr/bin/expect set timeout 30 spawn ssh -l dy 10.0.0.100 expect "password:" send "mypassword\r" interact (责任编辑:IT) |