خرید بک لینک

I am trying to create chroot environment on Ubuntu server 14.04. This is the chroot user and group i created:

Code:

max@ubuntu:~$ cat /etc/passwd | grep demo
demo:x:1002:1003:,,,:/home/demo:/usr/sbin/nologin

Code:

max@ubuntu:~$ cat /etc/group | grep sftpusers
sftpusers:x:1002:demo
This is the sshd_config file:

Code:

max@ubuntu:~$ tail /etc/ssh/sshd_config
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes

Subsystem sftp inteal-sftp

Match Group sftpusers
        ChrootDirectory /sftp/demo
        ForceCommand inteal-sftp
This is the permissions for the chroot directory 'demo':

Code:

max@ubuntu:~$ ll /sftp/
total 12
drwxrwxr-x  3 root root      4096 Feb 29 18:06 ./
drwxr-xr-x 22 root root      4096 Feb 15 17:21 ../
drwxrwxr-x  2 root sftpusers 4096 Feb 15 17:22 demo/

But i am not able to login with the user 'demo' through sftp:

Code:

$ sftp demo@192.168.56.105
demo@192.168.56.105's password:
Coection reset by 192.168.56.105
Coection closed

Any idea it doesn't allow me to login?

- - , .

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 10 اسفند 1394 ساعت: 23:19

صفحه بندی