Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2023 19:00:08 -0700
From:      bob prohaska <fbsd@www.zefox.net>
To:        Jamie Landeg-Jones <jamie@catflap.org>
Cc:        freebsd-net@freebsd.org, freebsd-arm@freebsd.org
Subject:   Re: -current dropping ssh connections
Message-ID:  <ZJpCqCVzcMGIruMU@www.zefox.net>
In-Reply-To: <202306222238.35MMcoQm017939@donotpassgo.dyslexicfish.net>
References:  <ZJMyPquk32fXhT%2BI@www.zefox.net> <E84D47F1-4E75-4DA1-8EE2-3E2F36DF0EF1@yahoo.com> <ZJM7VXyWotSGwAtH@www.zefox.net> <202306212305.35LN5ITH069587@donotpassgo.dyslexicfish.net> <ZJR5FzEEFofoh8f1@www.zefox.net> <202306222238.35MMcoQm017939@donotpassgo.dyslexicfish.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 22, 2023 at 11:38:50PM +0100, Jamie Landeg-Jones wrote:
> bob prohaska <fbsd@www.zefox.net> wrote:
> 
> > That seems worth a try.
> > The notion of an ssh escape (~. in this case) finding its way into the data stream is new to me.
> 
> Thinking again, that looks like corruption coming down the ssh connection.
> For the ssh escape char to affect anything (note it needs to be preceeded
> by a new line) it would have to be sent up the line.
> 
> For an example, assuming ssh has the default escape char, look at the difference between:
> 
> printf 'pwd;\n~.;echo sleeping.; sleep 5' | ssh -tt user@host
> 
> and with the same printf, but no escape char:
> 
> printf 'pwd;\n~.;echo sleeping.; sleep 5' | ssh -tt -e none user@host
> 
> You can see how the former closes the connection due to the \n~.
> 
> (The -tt forces a terminal/interactive session to be set up - normally, as we are
> piping input to ssh in this case, the terminal isnt set up, and the escape character
> isn't used - it's only recongnised in interactive sesions by default)
> 
> I personally have "EscapeChar none" in my ssh_config, but I suspect this
> is probably not the issue here, still, can't hurt to try it!

Indeed, connection was dropped with escape character set to none.
There does seem to be a some dependence on system load. Connections
survive at light or no load and drop when the sshd side is busy. 

Thanks for writing!

bob prohaska




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZJpCqCVzcMGIruMU>