PDA

View Full Version : ssh chroot works, but no scp for chroot users


zokahn
27th January 2006, 11:14
Hi all,

(I was in error scp works, sftp does not. scp only worked for winscp after i changed the permissions for: /usr/bin/groups to -rwxr-xr-x 1 root root 19 Jan 27 09:26 groups)

Iīve build my very own ssh chroot setup! Thanks Falko. However i was planning on using it to let users upload there data to my server. This is way is way more secure than the clear txt passwd ftp thingy

However, after building the ssh chroot folowing the howto: Normal users scp fine, chroot users get the error: Server refused to start a shell/command. (Using winscp, scp from other debian systems is ok: after i copied the scp bin to the chroot env)

Regards,

Zokahn

falko
27th January 2006, 19:37
(I was in error scp works, sftp does not. scp only worked for winscp after i changed the permissions for: /usr/bin/groups to -rwxr-xr-x 1 root root 19 Jan 27 09:26 groups)


I guess this means it's working now?

zokahn
29th January 2006, 01:19
Nope sftp does not work,

But hmm,.. Yes can get files over using WinSCP using a secure protocol. Maybe you know a way to get sftp working for chrooted users. It seems that the īprotocolī can work but i need to copy the right files in the chroot. Iīm talking sftp specific not scp.

Iīll keep on searching... but maybe you know.

Regards,

Zokahn

falko
29th January 2006, 22:36
I would have to check that on a test server (which I don't have available right now...).
But why do you want sftp instead of scp?

zokahn
30th January 2006, 00:00
I donīt know seems to be a default option in WinSCP. I did not toke the time to see what the difference is. I guess if this is ok itīs ok so donīt bother setting up a testserver.

I must say that this is really something :-) Iīm verry happy with the howtoīs

Thanks,

Zokahn

falko
30th January 2006, 10:33
It's ok to use SCP. :) But can you post /etc/ssh/sshd_config (or something like that)? Maybe there's an option in it that allows you to use sftp.