michaellukashov / Far-NetBox

SFTP/SCP/FTP/FTPS/WebDAV/S3 client for Far Manager 3 (http://farmanager.com/)
https://forum.farmanager.com/viewtopic.php?t=6317
GNU General Public License v2.0
155 stars 52 forks source link

Unable to connect to Pure-FTPd with TLS enabled #389

Open alabuzhev opened 4 months ago

alabuzhev commented 4 months ago

https://github.com/FarGroup/Far-NetBox/issues/29 by @Disassem

NetBox 2.4.5 with TLS/SSL Explicit encryption failed to connect:

. 2022-07-22 22:55:03.839 --------------------------------------------------------------------------
. 2022-07-22 22:55:03.840 NetBox Version 2.4.5 (Build 544) (OS 6.1.7601 Service Pack 1 - Windows 7 Professional)
. 2022-07-22 22:55:03.841 Configuration: NetBox 3\
. 2022-07-22 22:55:03.841 Working directory: C:\
. 2022-07-22 22:55:03.842 Process ID: 6640
. 2022-07-22 22:55:03.842 Time zone: Current: GMT (Standard Time), No DST
. 2022-07-22 22:55:03.842 --------------------------------------------------------------------------
. 2022-07-22 22:55:03.842 Transfer Protocol: FTP
. 2022-07-22 22:55:03.842 Code Page: 65001
. 2022-07-22 22:55:03.842 Ping type: Dummy, Ping interval: 30 sec; Timeout: 15 sec
. 2022-07-22 22:55:03.842 Disable Nagle: Yes
. 2022-07-22 22:55:03.842 Proxy: None
. 2022-07-22 22:55:03.842 Send buffer: 262144
. 2022-07-22 22:55:03.842 UTF: Off
. 2022-07-22 22:55:03.842 FTPS: Explicit SSL/TLS [Client certificate: No]
. 2022-07-22 22:55:03.842 FTP: Passive: Yes [Force IP: Auto]; MLSD: Auto [List all: Auto]; HOST: Auto
. 2022-07-22 22:55:03.842 Session reuse: Yes
. 2022-07-22 22:55:03.842 TLS/SSL versions: TLSv1.0-TLSv1.2
. 2022-07-22 22:55:03.842 Local directory: default, Remote directory: home, Update: Yes, Cache: No
. 2022-07-22 22:55:03.842 Cache directory changes: No, Permanent: No
. 2022-07-22 22:55:03.842 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2022-07-22 22:55:03.842 Timezone offset: 0h 0m
. 2022-07-22 22:55:03.842 --------------------------------------------------------------------------
. 2022-07-22 22:55:03.842 Username prompt (no username provided)
. 2022-07-22 22:55:04.861 Connecting to pureftpd.example.org ...
. 2022-07-22 22:55:04.867 TLS layer changed state from unconnected to connecting
. 2022-07-22 22:55:07.087 TLS layer changed state from connecting to connected
. 2022-07-22 22:55:07.137 Connected with pureftpd.example.org, negotiating TLS connection...
< 2022-07-22 22:55:07.137 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
< 2022-07-22 22:55:07.137 220-You are user number 1 of 100 allowed.
< 2022-07-22 22:55:07.137 220-Local time is now 22:55. Server port: 21.
< 2022-07-22 22:55:07.137 220-This is a private system - No anonymous login
< 2022-07-22 22:55:07.137 220 You will be disconnected after 15 minutes of inactivity.
> 2022-07-22 22:55:07.137 AUTH SSL
< 2022-07-22 22:55:07.137 500 This security scheme is not implemented
. 2022-07-22 22:55:07.137 Got reply 1004 to the command 1
* 2022-07-22 22:55:07.139 
* 2022-07-22 22:55:07.139 
* 2022-07-22 22:55:07.139 This security scheme is not implemented

WinSCP 5.21 connects fine to the same server, using AUTH TLS:

. 2022-07-22 23:22:58.235 --------------------------------------------------------------------------
. 2022-07-22 23:22:58.235 WinSCP Version 5.21.1 (Build 12643 2022-06-24) (OS 6.1.7601 Service Pack 1 - Windows 7 Professional)
. 2022-07-22 23:22:58.236 Configuration: C:\Programs\WinSCP 5.21\WinSCP.ini
. 2022-07-22 23:22:58.236 Log level: Debug 2
. 2022-07-22 23:22:58.236 Local account: Comp\Login
. 2022-07-22 23:22:58.236 Working directory: C:\Programs\WinSCP 5.21
. 2022-07-22 23:22:58.236 Process ID: 2348
. 2022-07-22 23:22:58.238 Ancestor processes: ...
. 2022-07-22 23:22:58.239 Command-line: "C:\Programs\WinSCP 5.21\WinSCP.exe" 
. 2022-07-22 23:22:58.239 Time zone: Current: GMT+ (Standard Time), No DST
. 2022-07-22 23:22:58.239 Login time: 22 Июль 2022 г. 23:22:58
. 2022-07-22 23:22:58.239 --------------------------------------------------------------------------
. 2022-07-22 23:22:58.239 Session name: pureftpd.example.org (Ad-Hoc site)
. 2022-07-22 23:22:58.239 Host name: pureftpd.example.org (Port: 21)
. 2022-07-22 23:22:58.239 User name:  (Password: No, Key file: No, Passphrase: No)
. 2022-07-22 23:22:58.239 Transfer Protocol: FTP
. 2022-07-22 23:22:58.239 Ping type: Dummy, Ping interval: 30 sec; Timeout: 15 sec
. 2022-07-22 23:22:58.239 Disable Nagle: No
. 2022-07-22 23:22:58.239 Proxy: None
. 2022-07-22 23:22:58.239 Send buffer: 262144
. 2022-07-22 23:22:58.239 UTF: Auto
. 2022-07-22 23:22:58.239 FTPS: Explicit TLS/SSL [Client certificate: No]
. 2022-07-22 23:22:58.239 FTP: Passive: Yes [Force IP: Auto]; MLSD: Auto [List all: Auto]; HOST: Auto
. 2022-07-22 23:22:58.239 Session reuse: Yes
. 2022-07-22 23:22:58.239 TLS/SSL versions: TLSv1.0-TLSv1.3
. 2022-07-22 23:22:58.239 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2022-07-22 23:22:58.239 Cache directory changes: Yes, Permanent: Yes
. 2022-07-22 23:22:58.239 Recycle bin: Delete to: No, Overwritten to: No, Bin path: 
. 2022-07-22 23:22:58.239 Timezone offset: 0h 0m
. 2022-07-22 23:22:58.239 --------------------------------------------------------------------------
. 2022-07-22 23:22:58.250 Username prompt (no username provided)
. 2022-07-22 23:23:01.605 Session upkeep
. 2022-07-22 23:23:01.616 Connecting to pureftpd.example.org ...
. 2022-07-22 23:23:01.616 Connected
. 2022-07-22 23:23:01.616 TLS layer changed state from unconnected to connecting
. 2022-07-22 23:23:01.619 TLS layer changed state from connecting to connected
. 2022-07-22 23:23:01.619 Connected with pureftpd.example.org, negotiating TLS connection...
. 2022-07-22 23:23:01.621 Read 266 bytes
< 2022-07-22 23:23:01.621 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
< 2022-07-22 23:23:01.621 220-You are user number 1 of 100 allowed.
< 2022-07-22 23:23:01.621 220-Local time is now 23:23. Server port: 21.
< 2022-07-22 23:23:01.621 220-This is a private system - No anonymous login
< 2022-07-22 23:23:01.621 220 You will be disconnected after 15 minutes of inactivity.
> 2022-07-22 23:23:01.621 AUTH TLS
. 2022-07-22 23:23:01.622 Read 18 bytes
< 2022-07-22 23:23:01.622 234 AUTH TLS OK.
. 2022-07-22 23:23:01.623 No data to read
. 2022-07-22 23:23:01.625 TLS connect: SSLv3/TLS write client hello
. 2022-07-22 23:23:01.639 TLS connect: SSLv3/TLS read server hello
. 2022-07-22 23:23:01.643 TLS connect: SSLv3/TLS read server certificate
. 2022-07-22 23:23:01.644 TLS connect: SSLv3/TLS read server key exchange
. 2022-07-22 23:23:01.644 TLS connect: SSLv3/TLS read server done
. 2022-07-22 23:23:01.652 TLS connect: SSLv3/TLS write client key exchange
. 2022-07-22 23:23:01.652 TLS connect: SSLv3/TLS write change cipher spec
. 2022-07-22 23:23:01.652 TLS connect: SSLv3/TLS write finished
. 2022-07-22 23:23:01.653 TLS connect: SSLv3/TLS write finished
. 2022-07-22 23:23:01.653 TLS connect: SSLv3/TLS read server session ticket
. 2022-07-22 23:23:01.653 TLS connect: SSLv3/TLS read change cipher spec
. 2022-07-22 23:23:01.653 TLS connect: SSLv3/TLS read finished
. 2022-07-22 23:23:01.653 Verifying certificate for "" with fingerprint *************** and 20 failures
. 2022-07-22 23:23:01.653 Certificate common name "pureftpd.example.org" matches hostname
. 2022-07-22 23:23:01.705 Certificate verified against Windows certificate store
. 2022-07-22 23:23:01.705 Using TLSv1.2, cipher TLSv1.2: ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(256) Mac=AEAD
. 2022-07-22 23:23:01.718 TLS connection established. Waiting for welcome message...