Autossh fails on startup

Something like:

Restart=always
RestartSec=120

Maybe...

Or see: systemd service automatic restart after StartLimitInterval


a) Try adding StartLimitIntervalSec=12 in [Unit] at the begining of autossh.service.

b) And Type=simple at [Service] part.

c) Reload daemon sudo systemctl daemon-reload.

d) Reenable it sudo systemctl enable autossh.

e) Start it sudo systemctl start autossh.

f) Reboot

Did it worked out?


You should also add:

Wants=network-online.target

This will ensure that all configured network devices are up and have an IP address assigned before the service is started.