shell
#!/usr/bin/expect
spawn ssh [email protected]
expect "*password:"
send "lizhenghua\r"
expect "*#"
interact
需要安裝expect, 如果執行失敗
yum install expect -y
轉載于:https://www.cnblogs.com/chenglee/p/9024977.html
shell
#!/usr/bin/expect
spawn ssh [email protected]
expect "*password:"
send "lizhenghua\r"
expect "*#"
interact
需要安裝expect, 如果執行失敗
yum install expect -y
轉載于:https://www.cnblogs.com/chenglee/p/9024977.html