Added autossh
parent
d6555e0560
commit
0f3d969c76
@ -0,0 +1,10 @@
|
||||
Host bpfilip.dk
|
||||
HostName bpfilip.dk
|
||||
IdentityFile /home/pi/.ssh/id_rsa
|
||||
User root
|
||||
Port 2223
|
||||
LocalForward 22 127.0.0.1:2222
|
||||
RemoteForward 2222 127.0.0.1:22
|
||||
RemoteForward 10.0.1.25:8081 127.0.0.1:8080
|
||||
GatewayPorts yes
|
||||
Compression yes
|
||||
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Keeps an SSH tunnel to 'bpfilip.dk' open
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/autossh -M 0 -N -q -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" bpfilip.dk
|
||||
ExecStop=/usr/bin/killall -s KILL autossh
|
||||
User=1000
|
||||
Group=1000
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Reference in New Issue