Created
October 27, 2022 11:54
-
-
Save chengscott/dfc8795fd48d3f3dfcd0c740efa1e395 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Reverse SSH connection | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/ssh -N -T -o "ServerAliveInterval 10" -o "ExitOnForwardFailure yes" -R 2222:localhost:22 chengscott@host | |
Restart=always | |
RestartSec=5s | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment