参考了 http://blog.csdn.net/topasstem8/article/details/17920127  和

http://blog.sina.com.cn/s/blog_560e31000101ajgw.html  的内容

 

#!/usr/bin/expect
spawn ssh -l snq 192.168.100.137
expect "password:"
send "12345678\r"
#expect eof
#exit
interact

 

主要使用了expect工具,可以根据这个例子进行进一步的学习。

 

相关文章:

  • 2022-12-23
  • 2021-11-22
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
猜你喜欢
  • 2021-08-18
  • 2022-12-23
  • 2023-03-17
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案