nano /etc/ssh/sshd_config
#Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp internal-sftp
Match group sftponly
ChrootDirectory /home/%u
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
addgroup sftponly
adduser maxi sftponly
/etc/init.d/ssh restart
nano /etc/passwd
maxi:x:1004:1004:,,,:/home/maxi:/bin/false
chown root:root /home/maxi
mathias@workstation:~$ ssh maxi@mattionline.de
Could not chdir to home directory /home/maxi: No such file or directory
This service allows sftp connections only.
Connection to mattionline.de closed.