Joshua Rogers
2023-Nov-10 23:38 UTC
Question about stderr output containing carriage return External
Hi all, I have recently only discovered that openssh prints lines to stderr separated by CLRF pairs, and am trying to understand where this behavior comes from. This behavior can be seen here: --snip-- $ ssh u at u 2>&1 | sed -n l ssh: Could not resolve hostname u: Name or service not known\r$ --snip-- I have seen section 11.3 from rfc4253, but am unsure whether that is the origin of this behavior. Is a "Debug Message"(SSH_MSG_DEBUG) considered anything that is logged on stderr? Any insights welcome! Cheers, Josh
Marian Beermann
2023-Nov-11 00:03 UTC
Question about stderr output containing carriage return External
Hi Josh, it's been around for a while: https://github.com/openbsd/src/commit/8747197a4a479407167d01f46017ddb99cc3cae2 Though the commit doesn't say why it needs the \r. Cheers, Marian On 11/11/23 00:38, Joshua Rogers wrote:> Hi all, > > I have recently only discovered that openssh prints lines to stderr > separated by CLRF pairs, and am trying to understand where this > behavior comes from. > > This behavior can be seen here: > --snip-- > $ ssh u at u 2>&1 | sed -n l > ssh: Could not resolve hostname u: Name or service not known\r$ > --snip-- > > I have seen section 11.3 from rfc4253, but am unsure whether that is > the origin of this behavior. Is a "Debug Message"(SSH_MSG_DEBUG) > considered anything that is logged on stderr? > > Any insights welcome! > > Cheers, > Josh > _______________________________________________ > openssh-unix-dev mailing list > openssh-unix-dev at mindrot.org > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Maybe Matching Threads
- Question about stderr output containing carriage return External
- Question about stderr output containing carriage return External
- Greeter openssh 7.4 is not according rfc4253.
- [PATCH] sshsig: check hashalg before selecting the RSA signature algorithm
- OpenSSH 7.7p1 interop failure with Twisted Conch 8.0.0-17.9.0