使用 Ubuntu 18.04 LTS 和 ProFTPD 1.3.5e。
我有 ProFTPD 在端口 20、21 上提供 FTP 服务并且运行得很好。
当我添加 /etc/proftpd/conf.d/sftp.conf 时,FTP 停止工作。当我删除 sftp.conf 并重新启动 proftpd 时,FTP 再次开始工作。我的结论是这个conf文件有问题。
另外,我希望 sftp 仅接受登录 ID 和密码进行身份验证。我怎么做?我查看了 SFTPAuthMethods 指令,看起来如果我忽略它,那么它将允许所有身份验证方法,这对我来说没问题。
这是 sftp.conf 文件:
<IfModule mod_sftp.c>
SFTPEngine on
Port 2222
SFTPLog /var/log/proftpd/sftp.log
# Configure both the RSA and DSA host keys, using the same host key
# files that OpenSSH uses.
SFTPHostKey /etc/ssh/ssh_host_rsa_key
SFTPHostKey /etc/ssh/ssh_host_dsa_key
SFTPAuthorizedUserKeys file:/etc/proftpd/authorized_keys/%u
# Enable compression
SFTPCompression delayed
</IfModule>
Run Code Online (Sandbox Code Playgroud)
我应该更改什么才能让 SFTP 在端口 2222 上运行并继续让 FTP 在端口 20 …
proftpd ×1