Skip to content

Instantly share code, notes, and snippets.

@jgomo3
Created June 8, 2021 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgomo3/5d8b75ad4990e4f1ceeadfdaae647ce1 to your computer and use it in GitHub Desktop.
Save jgomo3/5d8b75ad4990e4f1ceeadfdaae647ce1 to your computer and use it in GitHub Desktop.
AutoSSH reverse tunnel for allowing access
[Unit]
Description=AutoSSH reverse tunnel for allowing access here
After=network.target
[Service]
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -i /root/us-east-1.pem -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -NR 0.0.0.0:2000:localhost:22 ec2-user@52.207.226.149
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment