#!/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"