[Unit] Description=Auto SSH Tunnel After=network-online.target [Service] User=linaro Type=simple PIDFile=/var/run/autossh.pid ExecStart=/usr/bin/autossh \ -o "StrictHostKeyChecking=false" \ -o "ServerAliveInterval 60" \ -o "ServerAliveCountMax 10" \ -M 2222 \ -NR 5678:localhost:22 \ root@isa.qa \ -p 22 \ -i /home/linaro/.ssh/id_rsa ExecReload=/bin/kill -HUP $MAINPID KillMode=process StartLimitIntervalSec=5 StartLimitBurst=12 Restart=always RestartSec=42s [Install] WantedBy=multi-user.target