参考链接

FTP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
sudo apt-get update
sudo apt-get install vsftpd

sudo vi /etc/vsftpd.conf
##### 修改配置 #####
write_enable=YES
local_umask=022
chroot_local_user=YES
##### 添加配置 #####
allow_writeable_chroot=YES
pasv_enable=Yes
pasv_min_port=40000
pasv_max_port=40100
##### EOF #####

sudo vi /etc/shells
##### 添加配置 #####
/usr/sbin/nologin
##### EOF #####

Configure SSL with vsftpd

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem

sudo vi /etc/vsftpd.conf
##### 修改配置 #####
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
##### 添加配置 #####
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH
##### EOF #####
sudo service vsftpd restart