Reverse ssh tunnels

From dtype.org
Revision as of 19:58, 1 August 2021 by Drew (talk | contribs) (Created page with "== /etc/systemd/system/j1.service == <nowiki>[Unit] Description=Service to maintain an ssh reverse tunnel Wants=network-online.target After=network-online.target StartLimitIn...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

/etc/systemd/system/j1.service

[Unit] Description=Service to maintain an ssh reverse tunnel Wants=network-online.target After=network-online.target StartLimitIntervalSec=0 [Service] Type=simple Environment="J1HOST=c1" Environment="J1RAND=0" ExecStart= ExecStart=/usr/bin/ssh -qNn \ -o ServerAliveInterval=30 \ -o ServerAliveCountMax=3 \ -o ExitOnForwardFailure=yes \ -o StrictHostKeyChecking=no \ -o UserKnownHostsFile=/dev/null \ -o StreamLocalBindUnlink=yes \ -i /root/.ssh/id_rsa \ -R /home/r/socks/${J1HOST}.${J1RAND}.sock:localhost:22 \ r@j1.alt.org Restart=always RestartSec=60 [Install] WantedBy=multi-user.target