ITeye博客

脚本登录远端服务器并执行命令

xiaocao000 · 2014-07-10 12:52 · Unix/Linux · 操作系统 · Markdown

#!/bin/sh set timeout 30 spawn ssh @ expect { "*yes/no*" { send "yes\r"; exp_continue} "*Password:*" {send "password\r"} } expect "*#*" send "pss\r" interact

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。