温馨提示×

ubuntu filezilla如何改端口

小樊
47
2026-09-28 04:57:41
栏目: 智能运维

在 Ubuntu 下使用 FileZilla 修改端口,通常有以下几种情况,我分别说明:


一、连接 FTP / SFTP 服务器时修改端口(最常用)

如果你是用 FileZilla 连接远程服务器,改的是服务器端口:

  1. 打开 FileZilla
  2. 在顶部输入:
    • 主机:如 ftp.example.com 或 IP
    • 用户名 / 密码
    • 端口:
      • FTP 默认:21
      • SFTP(SSH)默认:22
      • FTPS 默认:21 或 990
  3. 直接修改「端口」框里的数字即可
  4. 点击「快速连接」

✅ 示例:

主机: 192.168.1.100
端口: 2222
协议: SFTP

二、修改 FileZilla Server 的监听端口(你自己在 Ubuntu 上搭服务器)

如果你在 Ubuntu 上运行的是 FileZilla Server(注意:官方 FileZilla Server 主要是 Windows,Linux 可用但较少):

方法 1:通过配置界面(如果有 GUI)

  1. 打开 FileZilla Server Interface
  2. Edit → Settings
  3. 找到 FTP Server / Listen on port
  4. 修改端口(如 2121)
  5. 保存并重启服务

方法 2:修改配置文件(Linux 常见)

sudo nano /opt/filezilla-server/etc/FileZilla Server.xml

找到类似:

<Settings>
  <Item name="ListenPort" type="numeric">21</Item>
</Settings>

改为:

<Item name="ListenPort" type="numeric">2121</Item>

保存后重启:

sudo systemctl restart filezilla-server

三、修改 vsftpd(Ubuntu 常见 FTP 服务)端口

如果你实际用的是 vsftpd(Ubuntu 最常见):

sudo nano /etc/vsftpd.conf

修改:

listen_port=2121

重启:

sudo systemctl restart vsftpd

四、被动模式端口(PASV)

如果是 FTP 被动模式:

pasv_min_port=30000
pasv_max_port=31000

如果你能说清楚:

  • 是 连别人服务器 还是 自己搭服务器
  • 用的是 FileZilla Client / Server / vsftpd

我可以给你更精确的命令。

0 踩