Last active
June 14, 2019 02:51
-
-
Save ardinusawan/257a086215bb2d146c38a780f120aa95 to your computer and use it in GitHub Desktop.
autossh daemon service
This file contains hidden or 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=Auto SSH Service | |
Wants=network-online.target | |
After=network-online.target | |
[Service] | |
Type=simple | |
User=pi | |
WorkingDirectory=/home/pi/autossh | |
ExecStart=/home/pi/autossh/script.sh | |
Restart=always | |
RestartSec=5s | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or 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
#this file located in /home/pi/autossh/ | |
#!/bin/bash | |
echo $(date)>>/tmp/autossh.out | |
autossh -M 0 -R [your-alias]:22:localhost:22 serveo.net |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment