On 30/9/20 8:47 pm, Adair, Fraser wrote:
We have migrated from RHEL 5.11 to RHEL 7.6 servers VMs (details of OpenSSH and SFTP version below)
On the new (RHEL 7.6) server we are seeing ^M (Windows Carriage Return) characters appearing at the end of records of files transferred to new server. This does not happen on the old server and we are using exactly the same file transfer, exactly the same files etc. just repointing from one server to the other.
As a guess, this sounds like you're transferring files by capturing
output on an interactive session:
$ ssh -t user@xxxxxxxxxxx cat datafile > local.datafile
user@xxxxxxxxxxx's password:
Connection to example.com closed.
$ grep -q '^M' local.datafile && echo CR seen
CR seen
Interactive sessions are subject to termcap/terminfo (although,
obviously, not an issue for cat) and stty (e.g. stty onlcr).
I expect onlcr is commonly set as NL normally just moves the cursor down
one line without moving it to the left of the screen; and CR normally
just moves it to the left of the screen without advancing one line.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev