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

15 lines
420 B
SYSTEMD
Raw Permalink 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 12:38:43 +02:00
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -o "ExitOnForwardFailure yes" -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