# useradd cent
# passwd cent
-- set passsword
# groupadd sftp_users
# usermod -G sftp_users cent
# vi /etc/ssh/sshd_config
-- line 147: comment out the line below
#Subsystem sftp /usr/libexec/openssh/sftp-server
-- add the following just after the above line
Subsystem sftp internal-sftp
-- add follows to the end
Match Group sftp_users
X11Forwarding no
AllowTcpForwarding no
ChrootDirectory /home
ForceCommand internal-sftp
-- Save the file
# systemctl restart sshd
Try to access using your favourite windows sftp client or using sftp command line :
# sftp cent@localhost
No comments:
Post a Comment