$ slappasswd -s pass123
{SSHA}AWfhDnqpI9vgPe9tHLF2YF/nDDK28iFl
Subsystem sftp internal-sftp
ForceCommand internal-sftp
$ ssh user@192.168.0.11
user@192.168.0.11's password:
Could not chdir to home directory /home/user: No such file or directory
This service allows sftp connections only.
Connection to 192.168.0.11 closed.
$ scp index.html user@192.168.0.11:public
user@192.168.0.11's password:
This service allows sftp connections only.
$ sftp user@192.168.0.11
user@192.168.0.11's password:
Connected to 192.168.0.11.
sftp> put index.html
Uploading index.html to /index.html
remote open("/index.html"): Permission denied
sftp> cd public
sftp> ls
sftp> put index.html
Uploading index.html to /public/index.html
index.html 100% 7440 7.3KB/s 00:00
sftp>
Match group chrootusers
ChrootDirectory /home/%u
X11Forwarding no
AllowTcpForwarding no