Skip to content

Instantly share code, notes, and snippets.

@yfe404
Last active July 3, 2020 12:31
Show Gist options
  • Save yfe404/8bebeff55c45e2f3eecfba372c910f6b to your computer and use it in GitHub Desktop.
Save yfe404/8bebeff55c45e2f3eecfba372c910f6b to your computer and use it in GitHub Desktop.
Systemd service for ssh tunneling
[Unit]
Description="Establish a SSH tunnel to orion to map searx port to local 3337"
After=sshd.service
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=Always
RestartSec=1
User=yfe
ExecStart=autossh -M 0 -L 3337:localhost:8888 yfe@orion -N
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment