Shell脚本实现自动登录
2017-09-27 23:19
946 查看
#!/usr/bin/expect spawn ssh hdp34 expect "~" send "ambari-server sync-ldap --all\r" expect "*login:" send "admin\r" expect "*password:" send "admind2322\r" interact 注意上面如果在(ssh hdp34已实现免密登录) spawn ssh hdp34 expect "~" 这里一开始"~" 输入的是 * 号。因而出现了下面命令输入全部出现输入顺序错误
相关文章推荐
- shell脚本实现ssh自动登录
- shell脚本-实现网站自动登录
- Shell脚本实现自动输入密码登录服务器
- linux使用shell脚本实现自动登录scp传输文件到其他服务器
- shell脚本自动登录FTP实现上传下载
- 用expect实现的自动登录到多台服务器的shell脚本
- 用expect实现的自动登录到多台服务器的shell脚本
- Shell脚本实现自动输入密码登录服务器
- shell脚本实现ssh自动登录功能分享
- Shell脚本实现自动输入密码登录服务器
- Shell脚本实现自动输入密码登录服务器
- shell脚本实现ssh自动登录-功能扩展,实现多个IP可选
- shell中实现自动登录(bash环境脚本中)
- shell脚本实现ssh自动登录功能分享
- shell脚本通过expect实现自动单边无密登录
- shell脚本通过expect实现自动单边无密登录功能
- shell中实现自动登录(bash环境脚本中)
- 用shell脚本实现监控程序自动重启
- Shell小脚本:实现自动安装Asterisk和DAHDI
- shell 自动登录脚本