Skip to content

Instantly share code, notes, and snippets.

@soltrain
soltrain / gist:7841916
Created December 7, 2013 14:06
Setup and SSH tunnel to an AWS server to jump China's Great Firewall. Requires AWS console tools installed on your computer and assumes you store your server instance + SSH key as an environment variable
echo "SSH to AWS using elastic IP"
echo "------------------------------"
echo "Starting EC2 Server"
ec2start $EC2SERVER
sleep 20
SERVER=$(ec2din --show-empty-fields -H $EC2SERVER |cut -f17| sed '/^$/d')
echo "Server IP is: $SERVER"
echo "Connecting to Server"