Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
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.
  1. #1
    Just 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:)

  2. #2
    Linux 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

  3. #3
    Just 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!:)

  4. #4
    Linux 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

  5. #5
    Just 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

  6. #6
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    is SSHD starting from within the jail?

  7. #7
    Just Joined!
    Join Date
    Jul 2003
    Posts
    12
    yes...
    #chroot /chroot/jail /sbin/sshd
    all is ok

  8. #8
    Linux 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

  9. #9
    Just Joined!
    Join Date
    Jul 2003
    Posts
    12
    ok :)
    10x anyway :)

  10. #10
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    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

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •