使用ssh登陆服务器
编辑vsftpd.conf文件
# vim /etc/vsftpd/vsftpd.conf
在文件末尾增加listen_port=2121
#remote_charset=CP1251
#
# Enable this options if you have double "я"
#
#double_377=0
listen_port=2121
打开/etc/services文件
# vim /etc/services
把21端口修改为2121
# 21 is registered to ftp, but also used by fsp
ftp 2121/tcp
ftp 2121/udp fsp fspd
重启ftp
# /etc/init.d/vsftpd restart
查看端口变化
# netstat -utlpn | grep vsftp
tcp 0 0 0.0.0.0:2121 0.0.0.0:* LISTEN 23619/vsftpd
完成