VSFTPD(Very Secure FTP Daemon)和SFTP(SSH File Transfer Protocol)是两种不同的文件传输协议,它们在Debian系统上的主要区别体现在以下几个方面:
sudo apt update
sudo apt install vsftpd
配置文件通常位于/etc/vsftpd.conf。
sudo apt update
sudo apt install openssh-server
SFTP服务默认随SSH服务器一起启动,无需额外安装。
编辑/etc/vsftpd.conf,添加或修改以下行:
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
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
然后重启服务:
sudo systemctl restart vsftpd
通常不需要额外配置,只需确保SSH服务器正在运行:
sudo systemctl status ssh
如果未运行,启动它:
sudo systemctl start ssh
在选择时,请根据你的具体需求和环境进行权衡。