SFTP ASCII Transfers Between RetroPie and Windows not working as expected
I am trying to edit some .sh files in windows and upload them to my RPI 3 running an SFTP host and it appears that the server is not translating CR/LF to just LF on its end.
I have tried using FileZilla as well as WinSCP and both are doing the same thing. Tried forcing it to be in ascii transfer mode and still the same result.
I would assume that the SSH host would know that it is in linux/unix mode but test results are revealing otherwise.
Has anyone else run into this issue? Did some forum searching and I havent found anything like this.
Actually, after further review, this appears to just be an issue with FileZilla. WinSCP does seem to work correctly. Which seems really odd since the conversion is not supposed to happen on the client end as far as I understand.
@alturis SSH (SCP actually) does not translate the newlines, there is no ASCII mode (like in FTP), so if you're seeing this it's a client feature (FileZilla or WinSCP). Make sure the file has Unix (LF) line endings before transferring and you won't have any problems.
EDIT: I recommend using Notepad++ and choosing Unix newlines as default line endings.
I recommend using Notepad++ and choosing Unix newlines as default line endings.
Will use Notepad++ from now on. Resolved that head-ache for me. Thanks.