#!/bin/bash echo 1___ip #随意添加 echo your choice: read N case "$N" in 1) ./login/1.sh ip;; ##随意添加 *) exit ;; esac exit 登录脚本 #!/usr/bin/expect spawn ssh -q user@$argv expect { "(yes/no)?" {send "yes\r"; exp_continue} "password:" {send "xxxxx\r";} } interact |
|