Skip to content

Instantly share code, notes, and snippets.

@ethagnawl
Created August 5, 2019 16:25
Show Gist options
  • Save ethagnawl/f96e488c2636f263711e24877a7b4d54 to your computer and use it in GitHub Desktop.
Save ethagnawl/f96e488c2636f263711e24877a7b4d54 to your computer and use it in GitHub Desktop.
auto reverse tunneling
[Unit]
Description=Reverse SSH Tunnel
After=network.target
[Service]
ExecStart=/usr/bin/ssh -N -R 27276:localhost:22 -o "ExitOnForwardFailure yes" server
KillMode=process
Restart=always
[Install]
WantedBy=multi-user.target
Host cr-remote
HostName localhost
Port 27276
@ethagnawl
Copy link
Author

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