Skip to content

Instantly share code, notes, and snippets.

Last active November 19, 2023 16:29
Star You must be signed in to star a gist
What would you like to do?
Systemd service for autossh
Description=Keeps a tunnel to '' open
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
ExecStart=/usr/bin/autossh -M 0 -N -q -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -p 22 -l autossh -L 7474: -i /home/autossh/.ssh/id_rsa
Copy link

stokito commented Jul 4, 2023

JFYI: I created an SSH tunnel SystemD service that works without the autossh

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