#!/bin/bash
/usr/bin/expect  << EOF
spawn ssh root@60.32.0.19
expect {
"yes/no*"  { send "yes\r"; exp_continue }
"*assword:" { send "m2a1s2u30000049\r" }
}
expect "root@fort2:~#"
send "df -lh\r"
expect "root@fort2:~#"
send "exit\r"
EOF

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2018-06-08
  • 2021-07-26
  • 2022-12-23
猜你喜欢
  • 2021-01-24
  • 2021-11-08
  • 2021-05-20
  • 2022-12-23
相关资源
相似解决方案