chmod 711 /
chmod 711 /home
chmod 711 /etc
sftp -oPort=2222 jeilpc@kcm.kr
sftp jeilpc@wp.jick.kr
vi /etc/ssh/sshd_config
#Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp
# Example of overriding settings on a per-user basis
Match User sftpsftp
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
ChrootDirectory /home/sftpsftp
/etc/init.d/sshd restart
[root@kcm home]# sftp -oPort="2222" sftpsftp@localhost
sftpsftp@localhost's password:
Write failed: Broken pipe
Couldn't read packet: Connection reset by peer
chown root /home/sftpsftp
chmod 755 /home/sftpsftp
cd /home/sftpsftp
mkdir UPLOAD
chown root:sftpsftp /home/sftpsftp/UPLOAD
chmod 775 /home/sftpsftp/UPLOAD