公司的服务器在国外,所以测试的查看日志的时候需要测试机,然后继续ssh
非常不方便,所以编写一个简单的ssh登入脚本
#!/usr/bin/expectset timeout 3spawn ssh name@ipexpect "*password*"send "passwd\r"send "cd 目录\r"interact
chmod +777 *.sh
执行以后发现,服务器上没有装expect
汗!