title: Systemd SSH tunnel service failing while command works in command line
body: <p>I've been trying to setup a SSH reverse tunnel Systemd service for automatically exposing my non-public IP computer to the internet for SSHing. I have two different services, one pointing to my own server (another computer with public IP) which works fine, and one trying to use <a href="https://serveo.net" rel="nofollow noreferrer">serveo.net</a> (a free service of TCP tunnelling via ssh client). My service works fine for my own server but fails for Serveo.</p>
  <p>My service definition is as follow:</p>
  <pre><code>[Unit]
  Description=Setup a remote tunnel to serveo.net
  Wants=network-online.target
  After=network-online.target
  StartLimitIntervalSec=0
  
  [Service]
  User=ssh-tunnel
  Group=ssh-tunnel
  ExecStart=/usr/bin/ssh -T -o ServerAliveInterval=60 -i /var/lib/ssh-tunnel/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ExitOnForwardFailure=yes -R myalias:58227:localhost:22 serveo.net
  Restart=always
  RestartSec=60
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  <p>When executing the same command in the terminal, it works correctly:</p>
  <pre><code>sudo -u ssh-tunnel -g ssh-tunnel /usr/bin/ssh -T -o ServerAliveInterval=60 -i /var/lib/ssh-tunnel/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ExitOnForwardFailure=yes -R myalias:58227:localhost:22 serveo.net
  </code></pre>
  <p>The only difference of behaviour I can see between my own server and Serveo is that Serveo has a sort of interactive command interface.</p>
  <p>Has anyone have a similar issue with Systemd services?</p>