I am trying to connect to vsftpd with curl, but it fails with the above mentioned SSL3_GET_RECORD error as shown below: curl --ssl-reqd --cacert /etc/tls/cacert.pem ftp://public.worldskills.org/ -u webmaster:Skill39\! --resolve 'public.worldskills.org:21:127.0.0.1' -v * Added public.worldskills.org:21:127.0.0.1 to DNS cache * Hostname public.worldskills.org was found in DNS cache * Trying 127.0.0.1... * TCP_NODELAY set * Connected to public.worldskills.org (127.0.0.1) port 21 (#0) < 220 (vsFTPd 3.0.3) < 234 Proceed with negotiation. * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /etc/tls/cacert.pem CApath: /etc/ssl/certs * TLSv1.2 (OUT), TLS header, Certificate Status (22): * TLSv1.2 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Request CERT (13): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Certificate (11): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Client hello (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS change cipher, Client hello (1): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384 * Server certificate: * subject: C=AU; ST=Some-State; O=Internet Widgits Pty Ltd; CN=*.worldskills.org * start date: Jun 4 06:47:39 2019 GMT * expire date: Jun 3 06:47:39 2020 GMT * common name: *.worldskills.org (matched) * issuer: C=AU; ST=Some-State; O=Internet Widgits Pty Ltd; CN=CA * SSL certificate verify ok. < 331 Please specify the password. * TLSv1.2 (OUT), TLS alert, Server hello (2): * SSL read: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number, errno 0 * Closing connection 0 curl: (56) SSL read: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number, errno 0
I can reproduce the issue, this is the client ouput:---- Connecting to ftp.xxxxx (1.1.1.1) port 21 <--- 220 ---> FEAT <--- 211-Features: <--- AUTH SSL <--- AUTH TLS <--- EPRT <--- EPSV <--- MDTM <--- PASV <--- PBSZ <--- PROT <--- REST STREAM <--- SIZE <--- TVFS <--- 211 End ---> AUTH TLS <--- 234 Proceed with negotiation. ---> USER test_user xxxxx matched <--- 331 Please specify the password. ---> PASS XXXX <--- 230 Login successful. ---> PWD <--- 257 "/" is the current directory ---> PBSZ 0 <--- 200 PBSZ set to 0. ---> PROT P <--- 200 PROT now Private. ---> PASV **** SSL_read: wrong version number ---- Closing data socket ---- Closing control socket ls: Fatal error: SSL_read: wrong version number # vsftpd -v vsftpd: version 3.0.3
I can't get vsftpd to work with implicit TLS and FTPS. It seems to be the same problem. I've tried so many different settings but nothing helped. I suspect there might be some SSL/TLS incompatibility between the old vsftpd and modern libraries in Debian. vsftpd version: 3.0.5-0.2 Debian version: 13.2 trixie Kernel: 6.12.57+deb13-amd64 My configuration worked in Debian 10 / buster. But now in 13 / trixie I have the problem described in this bug report here. 1.) Username and password input work. 2.) The user is authenticated OK. In "journalctl -r" I see: "vsftpd[57875]: pam_userdb(vsftpd:auth): user 'myusername' granted access" 3.) But then the connection terminates. No directory listing. I have tested with the latest versions of FileZilla FTP and WinSCP as clients and with curl 8.4.0. The output of curl is: ### $ curl --ssl-reqd ftps://server.example.org:29902/ -u myusername:sup3rs3cr3t -v * Trying 192.168.0.123:29902... * Connected to server.example.org (192.168.0.123) port 29902 * TLSv1.3 (OUT), TLS handshake, Client hello (1): * CAfile: /etc/pki/tls/certs/ca-bundle.crt * CApath: none * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.3 (OUT), TLS handshake, Client hello (1): * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): * TLSv1.3 (IN), TLS handshake, Certificate (11): * TLSv1.3 (IN), TLS handshake, CERT verify (15): * TLSv1.3 (IN), TLS handshake, Finished (20): * TLSv1.3 (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 * Server certificate: * subject: CN=server.example.org * start date: Dec 15 00:00:00 2025 GMT * expire date: Mar 15 23:59:59 2026 GMT * subjectAltName: host "server.example.org" matched cert's "server.example.org" * issuer: C=AT; O=ZeroSSL; CN=ZeroSSL RSA Domain Secure Site CA * SSL certificate verify ok. * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * old SSL session ID is stale, removing < 220 Welcome to my server < 331 Please specify the password. * TLSv1.3 (OUT), TLS alert, protocol version (582): * OpenSSL SSL_read: OpenSSL/1.1.1w: error:1408F10B:SSL routines:ssl3_get_record:wrong version number, errno 0 * Closing connection curl: (56) OpenSSL SSL_read: OpenSSL/1.1.1w: error:1408F10B:SSL routines:ssl3_get_record:wrong version number, errno 0 ### Output of WinSCP: ### SSL3 alert write: fatal: unexpected_message OpenSSL 0A0001BB: bad record type OpenSSL 0A000139: record layer failure Eine bestehende Verbindung wurde softwaregesteuert durch den Hostcomputer abgebrochen. Verbindung zur Gegenstelle abgebrochen Verbindung ist fehlgeschlagen. ### Output of FileZilla: ### Antwort: 220 Welcome to my server Befehl: USER myusername Antwort: 331 Please specify the password. Befehl: PASS ************** Fehler: GnuTLS-Fehler -15 in gnutls_record_recv: An unexpected TLS packet was received. Fehler: Konnte vom Socket nicht lesen: ECONNABORTED - Verbindung abgebrochen Fehler: Herstellen der Verbindung zum Server fehlgeschlagen Status: Nächsten Versuch abwarten... Fehler: Verbindungsversuch durch Benutzer unterbrochen ### Reg
Problem seems to be unsolved here as well in January 2025 - same error messages and codes: https://discussion.fedoraproject.org/t/vsftpd-ssl/141355
We believe that the bug you reported is fixed in the latest version of
vsftpd, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 929958@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Keng-Yu Lin <kengyu@debian.org> (supplier of updated vsftpd package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Thu, 25 Jun 2026 22:40:00 +0800
Source: vsftpd
Built-For-Profiles: noudeb
Architecture: source
Version: 3.0.5-1
Distribution: unstable
Urgency: medium
Maintainer: Keng-Yu Lin <kengyu@debian.org>
Changed-By: Keng-Yu Lin <kengyu@debian.org>
Closes: 644920 825271 827550 838678 844297 885402 929958 950577 950584 952421 958469 961712 968888 973766 1012476
Changes:
vsftpd (3.0.5-1) unstable; urgency=medium
.
* Add debian/patches/0079-debian-bugfixes.patch to address multiple bugs:
- Return 502 Command not implemented instead of 550 for disabled
PASV/PORT commands (Closes: #1012476).
- Document the Debian-specific utf8_filesystem option in the
man page (Closes: #950577).
- Trim leading and trailing whitespace/tabs in vsftpd.conf parsing
to prevent startup failures due to extra spaces (Closes: #950584).
- Dynamically fall back to IPv4 listening if IPv6 is disabled in
the kernel, avoiding package installation and daemon startup
failures (Closes: #961712).
* Add debian/patches/0080-pam-exec-hang.patch to prevent hanging in
the SIGCHLD handler when using PAM modules that spawn subprocesses,
e.g. pam_exec (Closes: #952421, #827550).
* Add debian/patches/0081-pasv-address-ipv6.patch to fix pasv_address
being ignored when listen_ipv6 is enabled and clients connect
via IPv4 (Closes: #968888).
* Add debian/patches/0082-debian-bugfixes-tls-utf8.patch to fix:
- Cap TLS 1.3 session ticket lifetime at 7 days (604800s) instead
of INT_MAX to comply with RFC 8446, preventing connection drops on
both control and data channels (Closes: #929958, #958469).
- Allow UTF-8 characters (high bytes >= 128) in logs and fix 177
typo in printability check (Closes: #644920).
- Fix assignment typo in vsf_sysutil_realpath causing double slashes
when resolving paths under the root directory (Closes: #825271).
- Remove obsolete absolute paths to pam_userdb.so in virtual users
examples (Closes: #885402).
* Move adduser from Recommends to Depends to satisfy postinst script.
* Officially close historically resolved/satisfied bugs that were left
open in the Debian Bug Tracking System (Closes: #838678, #844297, #973766).
Checksums-Sha1:
e89a4181f761a4c2ab46650e236eebec5b2a2fa4 1979 vsftpd_3.0.5-1.dsc
6032bde540e8463743db9c38fba3a9cc2a584509 40932 vsftpd_3.0.5-1.debian.tar.xz
41a2d3204773be4132348141d58f877b958cc5a5 7662 vsftpd_3.0.5-1_source.buildinfo
Checksums-Sha256:
b7d0b80446298de719b9c75480454ea4d0fe80f487684c7df8d1f0c71d2a055e 1979 vsftpd_3.0.5-1.dsc
4f24fdf374d2ff2bb0a749ef3a6db110ca3a30577c053a7ffaa902d882b2c843 40932 vsftpd_3.0.5-1.debian.tar.xz
f1b81ef09409584caa63d48ecd019889e34d6cb26f28ac1725ecad328a655d35 7662 vsftpd_3.0.5-1_source.buildinfo
Files:
1535e6c2a8445e6a8306b294975b42a7 1979 net - vsftpd_3.0.5-1.dsc
f23c7fde59435c896033cc7d9fa24b3f 40932 net - vsftpd_3.0.5-1.debian.tar.xz
ccc1766c8c9970127a3c28aad71a0eb8 7662 net - vsftpd_3.0.5-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJGBAEBCgAwFiEEdwtc2/tLhothQ0hFxheGnxR4UE4FAmo9RpoSHGtlbmd5dUBk
ZWJpYW4ub3JnAAoJEMYXhp8UeFBOBZoQAJgA0vT6Cy/3UEQftfU3aMmIl5xAoNxj
nbB64UaCtToVZiu1LMD36RpzRAf82aaO1MyGXkg4YkaR1DQWkvmmLEKn9vN2BgqQ
Z+TPEOKYSfum5BbfTpWI0OKEAzt6TgtcV12q6SdSZbDT7qlUQDKxZicojKXePCCN
gdH7PetlN4+w6c4czyYl+Vg5aSPv7qqrvroK6FONz5Q90B6kj+1wdvL3jjkhTYgr
1uIlmR9hLVsI/ab6OmHbtn7VjlO1XKE2NMrGr+NcCPFmSjVU1dUmcY+0pdojB8y7
u+vm0CT4KXI46RGUSTkrVKvibo/jdtrRG9WYKLN6sTMa69k310LUvZwuVaMT8kuJ
k9VvVWrHL83f9vjAPkXck722caYQ2QTzkcMQVFWts4WTFTktAHyPaLA+w3OXKiys
thpp5H7uBWLQukg7x4TivFt3nDB2RifqJFjQUcNpfKFkvsmafhZbkE48Zh1sJDSX
wjeib4h5sMii899gmTFkPDzyPQdxULey2q1URR3sNY/8uYLb2LHEy0WFR5unoTpz
ezkUbdgiFkeZOemZBoIgf7OBjWgpXsxZtsYS4JhP1S7Y0ZJdVfk/HyMqot98ht8Y
rO45bkeFIh4+VB4FQobA9HaZiMrcK+P9yLVQZi+tiJdecH2nLF9+4ZJbMcRRu0qN
9N9M8AKNBI11
=V8J2
-----END PGP SIGNATURE-----