From b84ec521bf073bd31e5f00498b760bd0f52b7b2b Mon Sep 17 00:00:00 2001 From: Maisem Ali Date: Thu, 6 Oct 2022 22:50:49 -0700 Subject: [PATCH] ssh/tailssh: do not send EOT on session disconnection This was assumed to be the fix for mosh not working, however turns out all we really needed was the duplicate fd also introduced in the same commit (af412e8874e94dc3ac57c37c3ec5e0606aa08fbb). Fixes #5103 Signed-off-by: Maisem Ali --- ssh/tailssh/tailssh.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/ssh/tailssh/tailssh.go b/ssh/tailssh/tailssh.go index 3cc031743..a4c76110f 100644 --- a/ssh/tailssh/tailssh.go +++ b/ssh/tailssh/tailssh.go @@ -1037,9 +1037,6 @@ func (ss *sshSession) run() { if _, err := io.Copy(rec.writer("i", ss.stdin), ss); err != nil { logf("stdin copy: %v", err) ss.ctx.CloseWithError(err) - } else if ss.ptyReq != nil { - const EOT = 4 // https://en.wikipedia.org/wiki/End-of-Transmission_character - ss.stdin.Write([]byte{EOT}) } }() go func() {