diff options
Diffstat (limited to 'doc/autossh.md')
-rw-r--r-- | doc/autossh.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/autossh.md b/doc/autossh.md new file mode 100644 index 0000000..fdcde19 --- /dev/null +++ b/doc/autossh.md @@ -0,0 +1,19 @@ +`/etc/systemd/system/my-ssh-tunnel.service`: + +``` +[Unit] +Description=ssh tunnel for localhost:22 +After=network.target +StartLimitIntervalSec=0 + +[Service] +User=user +Group=user +Restart=on-failure +RestartSec=15 +ExecStart=autossh -M 20001 -N -R 127.0.0.1:44223:127.0.0.1:22 -o StrictHostKeyChecking=no -o ExitOnForwardFailure=yes solarmon-tunnel@solarmon.ru +WorkingDirectory=/home/user + +[Install] +WantedBy=multi-user.target +```
\ No newline at end of file |