Re: sftp Carriage Return (^M) issue query

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



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




[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux