以下是Debian SFTP的安全加固措施:
~/.ssh/authorized_keys,禁用密码认证。/etc/ssh/sshd_config中设置ChrootDirectory限制用户仅能访问主目录,配合ForceCommand internal-sftp禁用Shell。PermitRootLogin no。X11Forwarding no、AllowTcpForwarding no。LogLevel VERBOSE),定期审查/var/log/auth.log。配置后需重启SSH服务生效:sudo systemctl restart sshd。