Create ssh_to_server.sh
This commit is contained in:
9
utility_to_sdk/ssh_to_server.sh
Normal file
9
utility_to_sdk/ssh_to_server.sh
Normal 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
|
||||||
Reference in New Issue
Block a user