secure-reverse-ssh-tunnel/secure-tunnel@.service

15 lines
416 B
SYSTEMD
Raw Normal View History

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
[Service]
Environment="AUTOSSH_GATETIME=0"
EnvironmentFile=/etc/default/secure-tunnel@%i
2020-08-01 00:51:40 +02:00
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -o "ExitOnForwardFailure" -NR ${JH_PORT}:localhost:"${HTE_PORT}" "${USER}"@"${TARGET}"
User=autossh
2020-07-31 21:56:43 +02:00
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target