sudo apt-get install tcl tk expect
#!/usr/bin/expect -f
set timeout 30
spawn sshroot@ip
expect "password:"
send "1234356\r"
expect "*#"
interact
sudo apt-get install tcl tk expect
#!/usr/bin/expect -f
set timeout 30
spawn sshroot@ip
expect "password:"
send "1234356\r"
expect "*#"
interact
本文标题:ssh-expect自动登入
本文链接:https://www.haomeiwen.com/subject/ujsxixtx.html
网友评论