Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Security
Reload this Page chroot openssh
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Security Discussion about keeping your machines secure, and the crackers out.

Reply
 
Thread Tools Display Modes
Old 08-09-2003   #1 (permalink)
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:)
patetobg is offline   Reply With Quote
Old 08-09-2003   #2 (permalink)
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
jasonlambert is offline   Reply With Quote
Old 08-09-2003   #3 (permalink)
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!:)
patetobg is offline   Reply With Quote
Old 08-16-2003   #4 (permalink)
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
jasonlambert is offline   Reply With Quote
Old 08-16-2003   #5 (permalink)
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
patetobg is offline   Reply With Quote
Old 08-16-2003   #6 (permalink)
Linux Guru
 
Join Date: Apr 2003
Location: London, UK
Posts: 3,284
is SSHD starting from within the jail?
jasonlambert is offline   Reply With Quote
Old 08-16-2003   #7 (permalink)
Just Joined!
 
Join Date: Jul 2003
Posts: 12
yes...
#chroot /chroot/jail /sbin/sshd
all is ok
patetobg is offline   Reply With Quote
Old 08-16-2003   #8 (permalink)
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
jasonlambert is offline   Reply With Quote
Old 08-16-2003   #9 (permalink)
Just Joined!
 
Join Date: Jul 2003
Posts: 12
ok :)
10x anyway :)
patetobg is offline   Reply With Quote
Old 08-16-2003   #10 (permalink)
Linux Guru
 
sarumont's Avatar
 
Join Date: Apr 2003
Location: /dev/urandom
Posts: 3,662
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.
sarumont is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 03:04 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0