使用expect自动登陆远程服务器自动填写密码

一:安装expectweb sudo apt-get install expect 二:登陆代码 bash #!/usr/bin/expect # 设置ssh链接的用户名 set user root # 设置ssh链接的host地址 set host ip地址 # 设置ssh链接的port端口号 # set port 9999 # 设置ssh链接的登陆密码 set password 登陆密码 #
相关文章
相关标签/搜索