When a connection is initially established with the server, it
determines what characters are used to indicate the end-of-line and
how they are displayed. On UNIX based systems, this is controlled by
the settings for the pseudo-terminal that is allocated for the client
session, and can be changed using the stty command. In most
cases, the client line mode can be left at the default. However, in
some cases you may need to change the line mode, particularly if you
intend to send data from a Windows text file or copied from the
clipboard.
Windows uses a carriage return and linefeed (CRLF)
sequence to indicate the end-of-line and a UNIX based server may
interpret that as multiple newlines. To prevent this, set the
NewLine property to sshNewLineCR and the CRLF sequence in the text will be replaced
by a single carriage return.