Re: How to maintain a persistent SSH connection?

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



also sprach Phil Pennock <phil.pennock@xxxxxxxxxxx> [2017-11-15 19:41 +0100]:
> So, instead of running no command server side, would a suitable
> workaround be to run 'while sleep 1; do echo .; done' as the server
> command and discard stdout from ssh on the client side?  That way, the
> server side should detect the dropped link sooner, leading to sshd exit
> and port release.

First, we need to debate to death whether it should be

  while sleep 1; do echo .; done

or

  while echo .; do sleep 1; done

;)

Nevermind! What an excellent idea, it's close to client-specified
ClientAliveInterval!

I can't exactly quantify the effects yet, but a first test (I used
`cat /etc/fstab` instead of `echo .` just to fill the pipe a bit
faster) shows that the sshd(8) process (a) still sticks around
longer than it should but (b) nowhere near as long as it does when
using the ssh(1) -N option instead (i.e. run no command on the
remote).

Thank you!

-- 
@martinkrafft | http://madduck.net/ | http://two.sentenc.es/
 
#include <signature.h>
 
spamtraps: madduck.bogus@xxxxxxxxxxx

Attachment: digital_signature_gpg.asc
Description: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux