13 lines
346 B
SYSTEMD
13 lines
346 B
SYSTEMD
|
[Unit]
|
||
|
Description=Setup a secure tunnel to %I
|
||
|
After=network.target
|
||
|
|
||
|
[Service]
|
||
|
Environment="AUTOSSH_GATETIME=0"
|
||
|
EnvironmentFile=/etc/default/secure-tunnel@%i
|
||
|
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -NR ${REMOTE_PORT}:localhost:22 ${USER}@${TARGET}
|
||
|
User=autossh
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|