Skip to content

Instantly share code, notes, and snippets.

@upbit
Last active August 29, 2015 14:16
Show Gist options
  • Save upbit/db528f7c8f4c33eb9eec to your computer and use it in GitHub Desktop.
Save upbit/db528f7c8f4c33eb9eec to your computer and use it in GitHub Desktop.
expect and connect with itnl 2022 port
#/bin/bash
killall itnl 2>&1 > /dev/null
itnl --tunnel &
expect -c "
set timeout 30
spawn ssh -p2022 root@127.0.0.1
expect {
\"*yes/no*\" {send \"yes\r\"; exp_continue}
\"*~ root#*\" {send \"cd /var/mobile/\r\"; interact}
}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment