首页主机资讯Ubuntu vsftpd SSL证书配置方法

Ubuntu vsftpd SSL证书配置方法

时间2025-11-07 00:26:03发布访客分类主机资讯浏览1454
导读:Here’s a concise guide to configuring SSL certificates for vsftpd on Ubuntu: 1. Install vsftpd Update your package list...

Here’s a concise guide to configuring SSL certificates for vsftpd on Ubuntu:

1. Install vsftpd

Update your package list and install vsftpd:

sudo apt update
sudo apt install vsftpd

2. Obtain an SSL Certificate

You can use Let’s Encrypt (free) or purchase a commercial certificate. For Let’s Encrypt:

sudo apt install certbot
sudo certbot certonly --standalone -d yourdomain.com

This creates certificates at /etc/letsencrypt/live/yourdomain.com/ (fullchain.pem and privkey.pem).

3. Configure vsftpd for SSL

Edit the vsftpd configuration file:

sudo nano /etc/vsftpd.conf

Add/modify these settings:

ssl_enable=YES
rsa_cert_file=/etc/letsencrypt/live/yourdomain.com/fullchain.pem
rsa_private_key_file=/etc/letsencrypt/live/yourdomain.com/privkey.pem
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
allow_anon_ssl=NO
local_enable=YES
write_enable=YES

Save and exit (Ctrl+O, Enter, Ctrl+X).

4. Restart vsftpd

Apply changes by restarting the service:

sudo systemctl restart vsftpd

5. Configure the Firewall

Allow FTP (port 21) and FTPS (port 990) traffic:

sudo ufw allow 21/tcp
sudo ufw allow 990/tcp
sudo ufw reload

6. Test the Configuration

Use an FTP client like FileZilla to connect to your server. Select “FTPES” (explicit TLS) as the encryption method. You should see a secure connection established.

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


若转载请注明出处: Ubuntu vsftpd SSL证书配置方法
本文地址: https://pptw.com/jishu/744572.html
Ubuntu vsftpd权限设置方法 Debian Golang日志如何实现远程访问

游客 回复需填写必要信息