auto_ssh_script
Auto SSH Script
Name of our file in our setup is gate.sh. The script looks like this“
[root@jarvis ~]# cat /usr/local/bin/gate.sh
#!/usr/bin/expect
set echo on
set timeout 5
spawn ssh -o “StrictHostKeyChecking=no” neo@gate.com
expect “neofit”
send “password\r”
expect *
interact
Obviously alias to be created in .bashrc:
alias gate='/usr/local/bin/gate.sh'
auto_ssh_script.txt · Last modified: 2016/11/16 15:50 by neo
