[systemd-devel] Setting Up SSH Tunnels

CACook at Quantum-Sci.com CACook at Quantum-Sci.com
Fri Jul 5 14:39:57 PDT 2013

Reindl Harald:
> Am 05.07.2013 23:03, schrieb CACook at Quantum-Sci.com:
>> Yes your command works standalone, and mine does too. The difference is yours does not release the shell.  Maybe
>> this is necessary for process tracking?
> if you think about how "Restart=always" works clearly *yes*
>> But neither one sets up a listener when run as a systemd service.  I've been using my command for five years and I
>> know it works. There must be something about the .service file that I don't recognize.
> yes, you need a ssh-command which does not release the shell like mine
> because otherwise systemd assumes it has failed and restarts over and over

Yup, I took off -f from mine, and now yours and mine work as a service. 
  Thanks Reindl!

Description=tunnel for Squid

#ExecStart=/usr/bin/ssh -l sleeper -i /home/sleeper/.ssh/id_ecdsa droog 
-N -C -L127.0.0.1:3128: droog
ExecStart=/usr/bin/ssh -l sleeper -i /home/sleeper/.ssh/id_ecdsa -2 -4 
-N -c aes256-ctr,aes128-ctr -L 3128: droog sleep 365d



More information about the systemd-devel mailing list