Skip to content

Instantly share code, notes, and snippets.

@dnouri
Created July 18, 2020 14:30
Show Gist options
  • Save dnouri/c9ce45bf22bf859ab41927bad0a896c0 to your computer and use it in GitHub Desktop.
Save dnouri/c9ce45bf22bf859ab41927bad0a896c0 to your computer and use it in GitHub Desktop.
Supervisor config for Raspberry Pis that sets up a reverse tunnel to myserver.com
[program:autossh40000]
command=bash -c "sleep 15 && exec /usr/lib/autossh/autossh -nN -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -o ServerAliveCountMax=3 -M 40010 -R 0.0.0.0:40000:localhost:22 myuser@myserver.com"
autorestart=true
user=pi
@dnouri
Copy link
Author

dnouri commented Jul 18, 2020

Use ssh pi@myserver.com -P 40000 to log in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment