Actually it is obvious - the algorithm is to convert LF (unix format) to CRLF (windows format) during the transfer (proper ASCII download). Or to convert CRLF to LF during the transfer from Windows pc to unix server (proper ASCII mode upload).EvilBMP wrote:I think so too. Anyways I can not understand why a SSH server should add those extra CRs...
So when you upload from windows to unix in ascii mode CRLF turns into LF. When you download from unix to windows in ascii mode LF turns into CRLF. Problems start to occur if you have managed to get the file uploaded WIRHOUT CRLF->LF conversion (in binary mode) and are trying to download WITH LF->CRLF conversion (ascii mode). You end up having (CR)LF->(CR)CRLF conversion.
It was simple from the very beginning, I just never thought about it this way. Your screenshot opened my eyes
