shell-scripte-code/sshtunnel1.service
2017-05-16 13:59:59 +02:00

16 lines
528 B
Desktop File
Executable file

[Unit]
Description=SSH Tunnel
ConditionPathExists=|/usr/bin
After=network.target
# host --> client; Weiterleitung von Port ... auf dem lokalen System an den Webserver (Port ...) auf server:
[Service]
User=root
ExecStart=/usr/bin/ssh -NTC -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa -L 12345:localhost:22 root@mgwywbvcwmot7vir.myfritz.net
# Restart every >2 seconds to avoid StartLimitInterval failure
RestartSec=3
Restart=always
[Install]
WantedBy=multi-user.target