Create ssh_to_server.sh

This commit is contained in:
2021-11-04 08:58:48 +08:00
committed by GitHub
parent 5da5e52220
commit e05a570336

View File

@@ -0,0 +1,9 @@
#!/usr/bin/expect -f
spawn ssh casperchang@192.168.50.51 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 -o ServerAliveInterval=5
expect "word: "
send "casper\r"
# expect "$ "
# ...... ##Various automated commands##
# expect "$ "
# send "exit\r"
interact