Skip to content

Instantly share code, notes, and snippets.

@adamjarret adamjarret/c9ssh.sh
Last active Apr 11, 2018

Embed
What would you like to do?
Get ssh command for connecting to AWS Cloud9 EC2 Environment (forward port 8080)
#!/bin/bash
WAN=$(curl -s https://api.ipify.org)
LAN=$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)
echo "ssh ec2-user@$WAN -L 8080:$LAN:8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.