AutoSSH
·1 min
SSH:
autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -i ~/.ssh/ec2-keypair-1 ubuntu@ec2-34-216-247-145.us-west-2.compute.amazonaws.com
SSH tunnel:
autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -i ~/.ssh/ec2-keypair-1 -NfL localhost:8889:localhost:3389 ubuntu@ec2-34-216-247-145.us-west-2.compute.amazonaws.com