LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-22-2003, 08:48 AM   #1
quozt
Member
 
Registered: Jul 2003
Location: Leeds
Distribution: Knoppix
Posts: 60

Rep: Reputation: 15
CHROOT help


im trying to restrict access from my computer to people, i want each user to be able to access only 1 shared folder on my computer and there "home folder" they can access via SSH and FTP but i dont know how to restrict access to 1 folder (ill put a shortcut to the shared folder in there home folder) ive been told this could be done via CHROOT but i dont know how to do it
 
Old 08-22-2003, 02:12 PM   #2
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Rep: Reputation: 30
by host

host="1.2.3.4"... in ~/.ssh/authorized_keys2

by command

command="/usr/local/sbin/mycheckit"...
in authorized_keys2

The older versions SSH-1.2X allowed for the practical AllowHosts directive in /etc/ssh/sshd_config, they are compiled it with TCP Wrappers (libwrap) so you should be able to use /etc/hosts.(deny,allow).
Now if you suspect it isnt set up with wrappers just compile your own --with-tcp-wrappers.

You can also add allowed IP's to iptables/ipchains for that extra edge :-].
What I do is add a file with a single IP per line, then add a bi-directional rule in the script, like:
for host in $(/bin/cat /etc/hosts.ssh); do $host; done
Keeps the script clean, and all allowed IP's easily accessable.

Last edited by Gerardoj; 08-22-2003 at 02:16 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot help Smokey Slackware 15 02-24-2013 11:32 PM
sudo /usr/bin/chroot /home/chroot /bin/su - xxx| /bin/su: user xxx does not exist saavik Linux - General 3 07-04-2007 10:30 AM
chRoot SpaceCadet Linux - Networking 3 08-14-2003 05:29 AM
Chroot chamkila Linux - General 1 06-13-2003 05:46 AM
Better than chroot? radnix Linux - Security 5 12-20-2002 06:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration