#!/usr/bin/expect
set timeout 20

spawn ssh -l root 172.25.254.102
expect "(yes/no)?"
send "yes\r"
expect "password"
send "Asimov\r"
expect "#"
send "hostname;exit\r"
expect eof

相关文章:

  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2021-05-27
  • 2022-12-23
  • 2021-10-29
猜你喜欢
  • 2022-12-23
  • 2022-02-02
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案