Results 1 to 10 of 14
did anybody succeded in chrooting SSHd?
i tried several patches ( using the "magic token" /./ in /etc/passwd ) but it's just not working!
all i want to do is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-09-2003 #1Just Joined!
- Join Date
- Jul 2003
- Posts
- 12
chroot openssh
did anybody succeded in chrooting SSHd?
i tried several patches ( using the "magic token" /./ in /etc/passwd ) but it's just not working!
all i want to do is this:
1) i want people to use scp and/or sftp to upload files to my server.
2) but they can see ONLY the chrooted dir....
( let's say /chroot/mp3 ). all users have permisions to write in this dir ( which is "chmod +t /chroot/mp3" ) , and to delete their own files.
BUT they CAN'T see the rest of the system..!!
please help with this:)
- 08-09-2003 #2Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
try:
http://www.debian.org/doc/manuals/se...sh-env.en.html
http://lists.canonical.org/pipermail...ay/000258.html
Also, this looks spot on, http://chrootssh.sourceforge.net theyve got a tut on setting up a chrool sftp as well.
Jason
- 08-09-2003 #3Just Joined!
- Join Date
- Jul 2003
- Posts
- 12
i've tried the chrootssh.sourceforge project , but it's not working for me.
when i type "chroot /chroot/jail /bin/bash" it's ok! ( pwd is / . and all i can see is the jail ). but when i try to log via ssh it says "/bin/bash permision denied".....(in /etc/passwd i have :
koko:x:/chroot/jail/./home/koko:/bin/bash )
and /bin/bash ( the chrooted one ) is r-xr-xr-x .
i just don't get it......the jail is ok....and i tried the patch , and the patched ssh......
p.s.
I'll look at those link's you gave me....
but i'm looking for a solution that WORKS!:)
- 08-16-2003 #4Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
many people have done it, i havent, it is unusual for people to want to do it.
Your sure you have a /bin/bash INSIDE the jail?
Jason
- 08-16-2003 #5Just Joined!
- Join Date
- Jul 2003
- Posts
- 12
yes .... when i do #chroot /chroot/jail /bin/bash i go in the jail , pwd is /
and i can see only the jai. But when i start sshd and log in pwd is /chroot/jail/home/admin , not just /home/admin....
in passwd the home dir is /chroot/jail/./home/admin
- 08-16-2003 #6Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
is SSHD starting from within the jail?
- 08-16-2003 #7Just Joined!
- Join Date
- Jul 2003
- Posts
- 12
yes...
#chroot /chroot/jail /sbin/sshd
all is ok
- 08-16-2003 #8Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
no idea.
Maybe a good place to go for help with this problem would be the SF chroot mailing list: chrootssh-users@lists.sourceforge.net
Give a full description of the problem and someone may be able to help you.
Jason
- 08-16-2003 #9Just Joined!
- Join Date
- Jul 2003
- Posts
- 12
ok :)
10x anyway :)
- 08-16-2003 #10
Hey, man...I was just reading about that and was going to try to set it up. I'll let you know what I come up with.
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy


Reply With Quote
