Ssl – vsftpd ssl (tls) fatal: protocol version

sslvsftpdwinscp

I'm trying to configure vsftpd. As for ftp it works pretty well, but for ssl it's causing errors and actually I cant connect to ftp by using ssl.
Here's WinSCP log for connection:

Server asks for authentication with a client certificate.
Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(256) Mac=AEAD

SSL3 alert write: fatal: protocol version
wrong version number
Disconnected from server
Connection failed.

And my vsftpd config:

listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
pasv_enable=YES
pasv_min_port=40000
pasv_max_port=50000
user_sub_token=$USER
local_root=/home/$USER/ftp
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
rsa_cert_file=/etc/letsencrypt/live/MYDOMAINAME-0001/fullchain.pem
rsa_private_key_file=/etc/letsencrypt/live/MYDOMAINNAME-0001/privkey.pem
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
require_ssl_reuse=NO
ssl_ciphers=HIGH
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO

Any suggestions how to fix this error?

Best Answer

I had this exact same problem and figured it out. The SSL error isn't the actual problem. What's happening is that the server has some kind of problem with the environment/config for the user but it's complaining about it I think in plaintext which confuses the SSL library so it gives the error.

So do this: disable SSL in the vsftpd.conf file, restart the service, then log on (from localhost for safety) and see what the actual problem is. I was hitting this issue (add allow_writeable_chroot=YES to the conf file) where the server would complain immediately after logon then close the connection. Once I corrected that so the user could log on successfully, I re-enabled SSL and everything worked as expected.

Hope this helps!

Related Topic