温馨提示×

debian怎么配filezilla站点

小樊
50
2026-09-20 01:31:59
栏目: 智能运维

在 Debian 上配置 FileZilla 站点(FTP/SFTP 连接) 通常有两种情况:

  1. 在 Debian 上安装 FileZilla 客户端,并添加站点
  2. 在 Debian 上搭建 FileZilla Server(FTP 服务器,较不常见)

下面分别说明。


一、Debian 上使用 FileZilla 客户端配置站点(最常见)

1. 安装 FileZilla

sudo apt update
sudo apt install filezilla -y

启动:

filezilla

2. 添加 FTP / SFTP 站点

  1. 打开 FileZilla
  2. 顶部菜单:文件 → 站点管理器(Site Manager)
  3. 点击 “新站点”
  4. 填写:
    • 主机(Host):服务器 IP 或域名
    • 端口(Port):
      • FTP:21
      • SFTP:22
    • 协议(Protocol):
      • SFTP(推荐)
      • FTP(不加密)
    • 登录类型:
      • 正常(用户名 + 密码)
    • 用户 / 密码
  5. 点击 连接

✅ SFTP 实际是 SSH 文件传输,最安全


二、Debian 搭建 FileZilla Server(FTP 服务)

⚠️ 注意:
FileZilla Server 官方主要支持 Windows
Debian 更推荐用 vsftpd / proftpd

推荐替代方案(Debian FTP 服务器)

安装 vsftpd

sudo apt install vsftpd -y
sudo systemctl enable vsftpd
sudo systemctl start vsftpd

配置

sudo nano /etc/vsftpd.conf

常用配置:

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES

重启:

sudo systemctl restart vsftpd

三、Debian 上使用 SFTP(无需额外服务)

如果你只是想传文件到 Debian:

# 直接用 FileZilla 连
协议:SFTP
端口:22
用户:你的 Linux 用户名
密码 / 密钥

✅ 不需要安装任何 FTP 服务


四、常见问题

1. 连接被拒绝

  • 检查防火墙
sudo ufw allow 21
sudo ufw allow 22

2. 被动模式失败(FTP)

在 vsftpd 中开启:

pasv_enable=YES
pasv_min_port=30000
pasv_max_port=31000

3. 推荐方案

✅ Debian + FileZilla 客户端 + SFTP(22端口)


如果你是想:

  • 搭 FTP 服务器
  • 用密钥登录
  • 配虚拟用户

可以告诉我,我给你具体配置示例。

0 踩