خرید بک لینک

Hello,

I would like to restrict the access of one SFTP user to one directory. SSH should not be allowed, only file exchange via SFTP.

I read many articles/instructions like
https://passingcuriosity.com/2014/op...o-sftp-chroot/
http://stackoverflow.com/questions/2...-one-directory
http://askubuntu.com/questions/59887...fied-directory

I created a user userftp, and a group ftp. The user is in the group (I already double-checked that)

None of my attempts worked, and I have an assumption why it is. This is my /etc/ssh/sshd_config file:

Code:

UsePAM yes

#Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp inteal-sftp


Match Group ftp
    ChrootDirectory %h
    ForceCommand inteal-sftp
    AllowTcpForwarding no
    PermitTuel no
    AllowAgentForwarding no
    X11Forwarding no
When I comment out the ChrootDirectory %h part, I can log in, but there is no restriction in directories. When this line is active, I caot log in.

FileZilla:

Code:

Response: fzSftp started, protocol_version=2
Command:        open "[email protected]" 22
Command:        Pass: *******
Error:  Coection reset by peer
Error:  Could not coect to server
I caot find anything in /var/log/syslog about it. I think the error is in the ChrootDirectory line, but I caot figure out why.

Can anybody help me? (Ubuntu 14.04 server)

Thanks!

برچسب: نویسنده: استخدام کار تاريخ: شنبه 4 ارديبهشت 1395 ساعت: 0:21

صفحه بندی