Failed attempt at creating SFTP and SSH Users


#1

Hi guys .

I just followed these instructions:

everything was going great until I encountered these problems.

In this step :

root@example.com:~# vim /etc/ssh/sshd_config
# Find below line
Subsystem sftp /usr/lib/openssh/sftp-server
# Replace above line with following line
Subsystem sftp internal-sftp

# Add following lines at EOF
Match group www-data 
X11Forwarding no 
ChrootDirectory %h 
AllowTcpForwarding no 
ForceCommand internal-sftp

I blocked my self into ssh …

and the second situation .

I can’t upload any image in wordpress or php

Thank you


#2

Hello, i have created a sftp using this command useradd -G www-data -ms /bin/false ee-user now i want to enable ssh for this user ssh (restricted to jailed home directory) . please help.

Thanks


#3

I’ve been using this solution:

http://blog.netgusto.com/solving-web-file-permissions-problem-once-and-for-all/

There are pros and cons, of course. But it solved my issue, perhaps it may be useful for you.


How can I restrict directory for www-data or other user
#4

Does that give sftp user to ssh to his / her home directory ?


#5

If you had read the post I suggested you’d already be aware of the answer to your question. :-/


#6

It worked . Thanks