Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 105851

Autostart of SSH Tunel on RPi Docker

$
0
0

Hello,

RPi Docker
i have made HA work behind Nat with SSH Tunel.
The only problem is autostart of if.

If i start a command from RPi’s CLI
ssh -p 22 -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -N -R 31281:localhost:8123 login@severadress.com
Tunnel works perfect.

I created a file /etc/systemd/system/ha-tunnel.service

[Unit]
Description=Tunnel for HA
After=network.target

[Service]
ExecStart=/usr/bin/ssh -p 22 -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -N -R 31281:localhost:8123 login@severadress.com

RestartSec=5
Restart=always

[Install]
WantedBy=multi-user.target

And then try to start it with

sudo systemctl start ha-tunnel

and it do not starts.

Staus shows me

 Loaded: loaded (/etc/systemd/system/ha-tunnel.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2020-08-12 01:08:24 BST; 3s ago
  Process: 10634 ExecStart=/usr/bin/ssh -p 22 -o ExitOnForwardFailure=yes -o ServerAliveInterval=60
 Main PID: 10634 (code=exited, status=255/EXCEPTION)

What have i’ve done wrong?

Thanks a lot!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 105851

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>