Last active
May 2, 2019 15:06
-
-
Save kronoc/c5f7650d2d73dd6c9c343534caaaeb33 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
# for rasbian | |
# sudo cp autossh.service /etc/systemd/system/ ; sudo systemctl enable autossh.service ; sudo reboot | |
[Unit] | |
Description=Keep ssh tunnel to specified remote host open | |
After=network.target | |
[Service] | |
User=USERNAME_TO_RUN_SSH_UNDER | |
ExecStart=/usr/bin/autossh -N tunnel | |
RestartSec=5 | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment