Skip to content

Instantly share code, notes, and snippets.

@iRhonin
Created January 5, 2019 07:11
Show Gist options
  • Save iRhonin/9164a5c9c187623b1c700747326f3275 to your computer and use it in GitHub Desktop.
Save iRhonin/9164a5c9c187623b1c700747326f3275 to your computer and use it in GitHub Desktop.
Unit file for ssh proxy
[Unit]
Description=nl SSH proxy service
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/bin/ssh -D 1234 -C -N -F %h/.ssh/config vps-nl -o ServerAliveInterval=1
ExecReload=/bin/kill -s HUP
ExecStop=/bin/kill -s TERM
Type=idle
Restart=always
RestartSec=1
StartLimitBurst=100
[Install]
WantedBy=default.target
@iRhonin
Copy link
Author

iRhonin commented Jan 5, 2019

Copy this file to .config/systemd/user/[service-name].service

systemctl --user daemon-reload
systemctl --user enable [service-name]
systemctl --user start [service-name]

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