Linux中expect實現自動登陸

cnde1:/home/boco4a#more ssh.sh
#!/usr/bin/expect
spawn ssh -l boco4a -p 22 10.226.100.32
expect "*password:"
sleep 1
send "J\$NBa4*#\r"
expect "*#"
interactssh

相關文章
相關標籤/搜索