#Match Group sftp 支持Group组控制 Match User bytedance,huaweimusic ChrootDirectory /home/sftp/%u X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp
#Match User huaweimusic
# ChrootDirectory /home/sftp/huaweimusic
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand internal-sftp
检查并重启sshd服务
1 2
sshd -t systemctl restart sshd
错误解决
1 2
sshd -t /etc/ssh/sshd_config line 105: Directive 'UsePAM' is not allowed within a Match block