From nobody Thu Jun 22 22:38:50 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QnFf92KDBz4gn5S; Thu, 22 Jun 2023 22:38:57 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [IPv6:2001:19f0:7400:8808:123::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4QnFf9027Fz3sTP; Thu, 22 Jun 2023 22:38:56 +0000 (UTC) (envelope-from jamie@catflap.org) Authentication-Results: mx1.freebsd.org; none X-Catflap-Envelope-From: Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [209.250.224.51]) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id 35MMcogb017940; Thu, 22 Jun 2023 23:38:51 +0100 (BST) (envelope-from jamie@donotpassgo.dyslexicfish.net) Received: (from jamie@localhost) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5/Submit) id 35MMcoQm017939; Thu, 22 Jun 2023 23:38:50 +0100 (BST) (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <202306222238.35MMcoQm017939@donotpassgo.dyslexicfish.net> Date: Thu, 22 Jun 2023 23:38:50 +0100 Organization: Dyslexic Fish To: jamie@catflap.org, fbsd@www.zefox.net Cc: freebsd-net@FreeBSD.org, freebsd-arm@FreeBSD.org Subject: Re: -current dropping ssh connections References: <202306212305.35LN5ITH069587@donotpassgo.dyslexicfish.net> In-Reply-To: User-Agent: Heirloom mailx 12.4 7/29/08 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (donotpassgo.dyslexicfish.net [209.250.224.51]); Thu, 22 Jun 2023 23:38:51 +0100 (BST) X-Rspamd-Queue-Id: 4QnFf9027Fz3sTP X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0:7400::/38, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N bob prohaska 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! Cheers, Jamie