Mac/Linux connection script

#!/bin/bash

# Change the IP address (or machine name) with each restart.
# Keep the original of this script, since "ec2-user" will still be your group's master account, and has sudo access.
ADDR=54.183.201.99 # change each time you start your machine to its current dns name or ip address NAME=ec2-user LHOST=localhost
SSHKEY=privatekeyname # change to the name of your private key file for i in `seq 8888 8900`; do FORWARDS[$((2*i))]="-L" FORWARDS[$((2*i+1))]="$i:${LHOST}:$i" done ssh -i ${SSHKEY} -X ${FORWARDS[@]} -l ${NAME} ${ADDR}