** 상위 디렉토리 접근 및 shell 접속 불가등
** 디렉토리는 운영서버 환경에 맞도록 수정한다.
# mkdir /data
# groupadd sftp
# useradd -g sftp -G sftp -d /data/nextbsc -s /bin/false nextbsc
# echo "nextbsc" | passwd --stdin nextbsc
# chown -R nextbsc.sftp /data/nextbsc
# chown root /data/nextbsc
# chmod 755 /data/nextbsc
# mkdir /data/nextbsc/upload
# chown nextbsc.sftp /data/nextbsc/upload
# vi /etc/ssh/sshd_config(# 주석처리)
#Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp -l VERBOSE
# Example of overriding settings on a per-user basis
Match Group sftp
ChrootDirectory /data/%u
X11Forwarding no
AllowTcpForwarding no
#PermitTTY no
#ForceCommand cvs server
ForceCommand internal-sftp -l VERBOSE
# systemctl restart sshd
** 테스트 방법
1. SSH 접속 확인
2. SFTP 접속 확인(change directory 여부 점검등)