搭建sftp过程中遇到如下问题:ssh登录提示
0 |
This service allows sftp connections only. |
解决方法:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
#Subsystem sftp /usr/libexec/openssh/sftp-server Subsystem sftp internal-sftp AllowTcpForwarding no X11Forwarding no Match Group sftpadmins,sftpusers ChrootDirectory /opt/ftpsite/%u ForceCommand internal-sftp #一定放到最下面或者注释掉 Subsystem sftp internal-sftp Match Group sftp Match User user1 ChrootDirectory /opt/sftp/%u AllowTcpForwarding no X11Forwarding no ForceCommand internal-sftp |
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!