Re: [systemd-devel] Setting Up SSH Tunnels

2013-07-06 Thread CACook
Reindl, thanks again for your help yesterday. I have hassled for years with my unreliable method of setting up the SSH tunnels. Reindl Harald: with the small script below i see the status of all forwarding-services including all ssh processes with their params and the last restart-time

[systemd-devel] Setting Up SSH Tunnels

2013-07-05 Thread CACook
For some years I've set up reverse SSH tunnels with a script, but when the tunnels go down they do not recover. I'd like to start and stop the tunnels using systemd. A typical command looks like this: /usr/bin/ssh -f -l sleeper -i /home/sleeper/.ssh/id_ecdsa -2 -4 -c aes256-ctr,aes128-ctr

Re: [systemd-devel] Setting Up SSH Tunnels

2013-07-05 Thread Reindl Harald
Am 05.07.2013 19:16, schrieb cac...@quantum-sci.com: For some years I've set up reverse SSH tunnels with a script, but when the tunnels go down they do not recover. I'd like to start and stop the tunnels using systemd. A typical command looks like this: /usr/bin/ssh -f -l sleeper -i

Re: [systemd-devel] Setting Up SSH Tunnels

2013-07-05 Thread Reindl Harald
Am 05.07.2013 21:20, schrieb cac...@quantum-sci.com: Reindl Harald: oneshot is plain wrong if you have a long living prcoess below a working unit to have a remote-server's ssh on localhost:10024 RestartSec=60 because so it survives reboots of the forwarded machine with auto reconnect

Re: [systemd-devel] Setting Up SSH Tunnels

2013-07-05 Thread CACook
Reindl Harald: But does this mean I have to have over 20 .services for my reverse tunnels? They could all start in parallel, but is there no better way? this is a *perfect* way and the only one Restart=always can work relieable no matter how many of them, build one, test it carefully and copy

Re: [systemd-devel] Setting Up SSH Tunnels

2013-07-05 Thread CACook
Reindl Harald: Am 05.07.2013 23:03, schrieb cac...@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