linux免密ssh登录脚本

1.使用expectlinux #!/usr/bin/expect set timeout 20 set ip 192.168.2.17 set pwd 123456 spawn ssh imp@${ip} expect -re "password" { send "${pwd}\r" } interact 命令说明:web interact 进入交互终端 expect eof 退出 spawn
相关文章
相关标签/搜索