[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New line handling in a server
[Thread Prev] | [Thread Next]
- Subject: Re: New line handling in a server
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 18 May 2022 12:19:07 +0200
- To: libssh@xxxxxxxxxx
- Cc: Levente <leventelist@xxxxxxxxx>
On Wednesday, May 18, 2022 11:57:46 AM CEST Levente wrote: > Hi, Hey! > > I'm developing a CLI using an ssh server, and everything works as > expected, except for the new line character. > > I experience that my client (ssh) sends \n as newline character, but > also the client requires \r\n to have proper new line when receiving > text. Otherwise I get something like this: > > This is a > new line, and > another. > > This is strange, because if I use the same client, and login to a linux > server, and I test for \n it works as expected: > > $ echo -e "Test \n for newline" > Test > for newline > > > Are there any settings in libssh to make my client interpret \n as new > line like in my ssh session? The data you receive is your responsibility. libssh doesn't alter it. Andreas -- Andreas Schneider asn@xxxxxxxxxxxxxx GPG-ID: 8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D
New line handling in a server | Levente <leventelist@xxxxxxxxx> |