sudo apt update && sudo apt upgrade -y
更新系统及软件包。/etc/apt/sources.list
源文件,替换为新版本代号(如从Buster到Bullseye),执行 sudo apt full-upgrade
。unattended-upgrades
工具:sudo apt install unattended-upgrades
,并通过 dpkg-reconfigure
启用,配置自动更新安全补丁。sudo systemctl status apt-daily.timer
。ufw
或 iptables
限制FTP端口(默认21)访问,仅允许可信IP。/etc/vsftpd.conf
,设置 anonymous_enable=NO
。vsftpd
的 ssl_enable=YES
)。/var/log/vsftpd.log
和 /var/log/auth.log
,分析异常登录或操作。top
、htop
)监控服务器资源使用情况,避免负载过高。/var/ftp
)和配置文件,可使用 cron
定时任务自动化备份。参考来源: