sftp配置参考 https://www.cnblogs.com/flyback/p/6492059.html
sftp服务限制用户登录家目录 - 乐晨的个人空间 - OSCHINA - 中文开源技术交流社区
[root@honor-cosmic ssh]# vim /etc/ssh/sshd_config Subsystem sftp internal-sftp Match Group sftp ChrootDirectory /kingdee/jenkins/share ForceCommand internal-sftp AllowTcpForwarding no X11Forwarding no 打开sftp的日志 [root@honor-cosmic ssh]# vim /etc/ssh/sshd_config Subsystem sftp internal-sftp -l INFO -f local5 #开启日志 LogLevel INFO #等级 Match Group sftp ChrootDirectory /kingdee/jenkins/share ForceCommand internal-sftp AllowTcpForwarding no X11Forwarding no [root@honor-cosmic ssh]# vim /etc/rsyslog.conf 最后加一行 auth,authpriv.*,local5.* /var/log/sftp.log [root@honor-cosmic ssh]# systemctl restart rsyslog.service