ubuntu

ubuntu filezilla如何使用FTPES

小樊
47
2025-10-24 16:43:28
栏目: 智能运维

Here’s a step-by-step guide to using FTPES (FTP over Explicit TLS) with FileZilla on Ubuntu:

1. Install and Configure vsftpd (Ubuntu Server)

FTPES requires an FTP server that supports SSL/TLS (like vsftpd). If you haven’t installed it yet:

sudo apt update
sudo apt install vsftpd

Edit the vsftpd configuration file to enable FTPES:

sudo nano /etc/vsftpd.conf

Add/modify these lines (key settings for FTPES):

ssl_enable=YES                # Enable SSL/TLS
force_local_data_ssl=YES      # Force data connections to use SSL
force_local_logins_ssl=YES    # Force login connections to use SSL
ssl_tlsv1=YES                 # Use TLSv1 (recommended)
ssl_sslv2=NO                  # Disable SSLv2 (insecure)
ssl_sslv3=NO                  # Disable SSLv3 (insecure)
rsa_cert_file=/etc/ssl/private/vsftpd.pem  # Path to SSL certificate
rsa_private_key_file=/etc/ssl/private/vsftpd.pem  # Path to private key

Generate a self-signed SSL certificate (for testing; use a CA-signed cert in production):

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
  -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem

Set strict permissions for the certificate:

sudo chmod 600 /etc/ssl/private/vsftpd.pem

Restart vsftpd to apply changes:

sudo systemctl restart vsftpd

Allow FTP ports in the firewall (UFW):

sudo ufw allow 21/tcp          # Control channel (FTPES uses port 21)
sudo ufw allow 990/tcp         # Optional: Data channel (if using passive mode)
sudo ufw reload

2. Use FileZilla to Connect via FTPES (Ubuntu Client)

  1. Open FileZilla and go to File > Site Manager.
  2. Create a new site:
    • Host: Enter your server’s IP address or domain name.
    • Protocol: Select FTP - File Transfer Protocol (do not choose “SFTP”).
    • Encryption: Choose Require explicit FTP over TLS (this is FTPES).
    • Logon Type: Select Normal (or “Ask for password” if needed).
    • User/Password: Enter your FTP username and password.
  3. Save and connect: Click Connect. FileZilla will verify the server’s SSL certificate. If it’s self-signed, you’ll see a warning—accept it to proceed.

Key Notes for Success

By following these steps, you’ll establish a secure FTPES connection between FileZilla (Ubuntu client) and your vsftpd server (Ubuntu or other Linux distro).

0
看了该问题的人还看了