脚本登录远端服务器并执行命令
#!/bin/sh set timeout 30 spawn ssh @ expect { "*yes/no*" { send "yes\r"; exp_continue} "*Password:*" {send "password\r"} } expect "*#*" send "pss\r" interact
#!/bin/sh set timeout 30 spawn ssh @ expect { "*yes/no*" { send "yes\r"; exp_continue} "*Password:*" {send "password\r"} } expect "*#*" send "pss\r" interact
暂无评论。
评论功能维护中,当前仅展示历史评论。