Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
systemd service description for autossh tunnel within a screen
[Unit]
Description=AutoSSH tunnel in a screen
After=network-online.target
[Service]
User=changeme
Type=simple
Restart=on-failure
RestartSec=3
ExecStart=/usr/bin/screen -DmS tunnel1 /usr/lib/autossh/autossh -M 20020 -D 0.0.0.0:12345 me@mybox.there.com
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.