galerija-bot/systemd/tunel-ssh.service

17 lines
522 B
INI
Raw Normal View History

[Unit]
Description=SSH tunel
After=network.target
[Service]
# Tuneliraj lokalni port 22 na streznikov port 2222
User=g1smo
RemainAfterExit=yes
EnvironmentFile=/etc/default/galbot
#ExecStart=/usr/bin/autossh -M 20000 -nNT -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -R 2222:localhost:22 ${REMOTEUSER}@${REMOTEHOST}
ExecStart=/usr/bin/ssh -nNT -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -R 2222:localhost:22 ${REMOTEUSER}@${REMOTEHOST}
RestartSec=5
Restart=always
[Install]
WantedBy=multi-user.target