diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-06-11 21:53:36 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-06-11 21:53:36 +0300 |
commit | 4daaed02f5b888ca2ee423967d3eadd09d0d0975 (patch) | |
tree | bac62dbaa1a32c56354760df93772abb9b0ef64b /doc/autossh.md | |
parent | 96145418dda05ad9b3bfba0ef9603cd27145190e (diff) |
some documentation
Diffstat (limited to 'doc/autossh.md')
-rw-r--r-- | doc/autossh.md | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/doc/autossh.md b/doc/autossh.md index fdcde19..fb41a15 100644 --- a/doc/autossh.md +++ b/doc/autossh.md @@ -2,18 +2,25 @@ ``` [Unit] -Description=ssh tunnel for localhost:22 +Description=ssh tunnel 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 +Restart=always +RestartSec=1 +ExecStart=autossh -M 0 -NC -R 127.0.0.1:44223:127.0.0.1:22 -o StrictHostKeyChecking=no -o LogLevel=ERROR -o ExitOnForwardFailure=yes -o ServerAliveInterval=15 -o ServerAliveCountMax=2 user@host WorkingDirectory=/home/user [Install] WantedBy=multi-user.target +``` + +On server: + +``` +ClientAliveInterval 15 +ClientAliveCountMax 2 ```
\ No newline at end of file |