3 ms·
Can't you just add something like ServerAliveCountMaxto help with solving stale connections? So something like that would solve that [Unit] Description=look
by elashri 2y ago
Can't you just add something like ServerAliveCountMaxto help with solving stale connections?
So something like that would solve that
[Unit]
Description=look ma, no autossh
After=network.target
[Service]
Type=exec
ExecStart=/usr/bin/ssh -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -Nn -R 7070:localhost:22 pc 'sleep 20m'
Restart=always
RestartSec=20
RuntimeMaxSec=30m
[Install]
WantedBy=default.target
- xk3 2y agoThe default of ServerAliveCountMax is already 3