I'm facing this problem - when I ssh to the server, the user is authenticated correctly, but then the connection is closed with:
Could not chdir to home directory /home/blazej: No such file or directory.
getent passwd blazej
shows:
blazej:x:1002:1002::/home/blazej:
sshd_conf
:
# Begin SFTP-Server block
Match Group sftp
ChrootDirectory %h
AllowTCPForwarding no
X11Forwarding no
# ForceCommand internal-sftp // This is commented not to force sfto on `sftp` group - I want to be able to ssh with users in `sftp` group
PasswordAuthentication yes
# End SFTP-Server block
luqo33 user belongs to groups: blazej, sftp
I do not see why ssh'ing with blazej
user would fail. On the other habd, sftp works as expected and logs the user to his home dir /home/blazej
.
Do you have any idea why I ssh'ing in the terminal fails?
Further details:
ls -la
in /home/blazej :
root@host:/home/blazej# ls -la
total 32
drwxr-x--- 5 root sftp 4096 Nov 21 09:00 .
drwxr-xr-x 5 root root 4096 Nov 21 09:00 ..
-rw-r--r-- 1 blazej blazej 220 Apr 8 2014 .bash_logout
-rw-r--r-- 1 blazej blazej 3637 Apr 8 2014 .bashrc
drwxr-x--- 2 blazej www-data 4096 Nov 21 09:00 exports
drwxr-x--- 2 blazej www-data 4096 Nov 21 09:00 imports
drwxr-x--- 2 blazej www-data 4096 Nov 21 09:00 other
-rw-r--r-- 1 blazej blazej 675 Apr 8 2014 .profile
getent
output.blazej
own?