温馨提示×

Debian vsftp默认端口是多少

小樊
33
2026-07-16 02:20:55
栏目: 智能运维

Debian 下 vsftpd(Very Secure FTP Daemon)默认端口是 21(FTP 控制连接端口)。

补充说明:

  • 端口 21:用于 FTP 命令控制(登录、切换目录、上传下载指令等)
  • 端口 20:用于**主动模式(Active Mode)**的数据传输(默认不一定开启)
  • 被动模式(Passive Mode):端口是动态协商的,通常需要在 vsftpd.conf 中手动指定范围,例如:
    pasv_enable=YES
    pasv_min_port=30000
    pasv_max_port=31000
    

查看 Debian 上 vsftpd 是否监听 21 端口

ss -lntp | grep :21
# 或
netstat -lntp | grep :21

修改默认端口(可选)

如果想改成其他端口(如 2121):

listen_port=2121

然后重启服务:

sudo systemctl restart vsftpd

如果你需要,我也可以帮你排查 Debian + vsftpd 连接/防火墙/被动模式 的常见问题。

0