linux跳板机自动登录服务器脚本

新建login.sh脚本 脚本内容以下web #!/usr/bin/expect -f set timeout 1 // 超时 等待时间 set pass [lindex $argv 0] // 获取第一个输入参数 本人实际使用须要动态密码 set password xxxxx //静态密码 spawn ssh -p22 xxxx@xxxx // 用户名@跳板机服务器 expect "passw
相关文章
相关标签/搜索