FTP "Got reply 1004 to the command 1" if remote banner has an embedded carriage return
This was a puzzling one, since FTP from Windows command prompt worked, but not WinSCP FTP.
Environment
PC: WinSCP 5.7.7
Server: RHEL 6.7 with vsftpd-2.2.2-24.el6.x86_64
Descripton
If the remote FTP banner (
Logging level 2 excerpt
Environment
PC: WinSCP 5.7.7
Server: RHEL 6.7 with vsftpd-2.2.2-24.el6.x86_64
Descripton
If the remote FTP banner (
vsftpd.conf
ftpd_banner
option) has an embedded carriage return (^M), the WinSCP login will fail with Remove the carriage return, and everything is fine!Got reply 1004 to the command 1
Logging level 2 excerpt
. 2022-05-17 15:16:51.798 Connected with <redacted>. Waiting for welcome message... < 2022-05-17 15:16:51.798 220 This server is the property of <redacted>. < 2022-05-17 15:16:51.798 Unauthorized access is prohibited. > 2022-05-17 15:16:51.798 USER <redacted> . 2022-05-17 15:16:51.798 Connection failed. . 2022-05-17 15:16:51.798 Got reply 1004 to the command 1 * 2022-05-17 15:16:51.848 (EFatal) Connection failed. * 2022-05-17 15:16:51.848 Connection failed.