hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Dedicated Server : Restricting SSH users to home dir - how?
Reply

Dedicated Server Current and past experiences with dedicated server providers, bandwidth, and server performance. Review managed and unmanaged dedicated web servers, discuss both Windows and Unix dedicated server solutions, and discuss dedicated hosting providers. If your service is unavailable, please click here.
Forum Jump

Restricting SSH users to home dir - how?

Reply Post New Thread In Dedicated Server Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 02-04-2004, 09:54 PM
fudgie fudgie is offline
Newbie
 
Join Date: May 2002
Posts: 15

Restricting SSH users to home dir - how?


Need some help folks on something that should be easy on a linux sys...

Running Plesk 6 on ES 2.1

Require to provide ssh access to a user but I dont want them to be able to read or view files or folders up from their home dir.

How can I achieve this? Do I need to consider using another ssh shell from plesk config setup?

Any pointers & maybe how to do will greatly be appreciated.

Regards
fudgie

Reply With Quote


Sponsored Links
  #2  
Old 02-04-2004, 10:16 PM
hiryuu hiryuu is offline
Web Hosting Master
 
Join Date: Jan 2003
Posts: 1,715
The problem with shell access (vs FTP or webdav) is the user needs access to any programs they'd want to run. That requires setting up some type of jail or chroot install in their directory. You can probably google for instructions on setting that up.

__________________
Game Servers are the next hot market!
Slim margins, heavy support, fickle customers, and moronic suppliers!
Start your own today!

Reply With Quote
  #3  
Old 02-04-2004, 10:27 PM
CArmstrong CArmstrong is offline
Retired Moderator
 
Join Date: Aug 2003
Location: Pittsburgh
Posts: 3,475
Just wondering, but shouldn't this be in Technical & Security Issues?

__________________
WHT HelpDesk

Reply With Quote
Sponsored Links
  #4  
Old 02-04-2004, 10:40 PM
fudgie fudgie is offline
Newbie
 
Join Date: May 2002
Posts: 15
Oops.. if it needs to be there, can mod please move it ?
Sorry.

Reply With Quote
  #5  
Old 02-05-2004, 01:50 AM
innova innova is offline
Web Hosting Master
 
Join Date: Dec 2002
Posts: 1,300
Read up on restricted shell. Google is your friend. YMMV.

__________________
"The only difference between a poor person and a rich person is what they do in their spare time."
"If youth is wasted on the young, then retirement is wasted on the old"

Reply With Quote
  #6  
Old 02-05-2004, 03:13 AM
l0ck_up l0ck_up is offline
Pixellegion
 
Join Date: Dec 2003
Posts: 501
My suggestion...never give any of your user SSH access, it's very dangerous. You have to think twice....
Especially if you use this server on hosting business.

Reply With Quote
  #7  
Old 02-05-2004, 06:01 AM
fudgie fudgie is offline
Newbie
 
Join Date: May 2002
Posts: 15
Ppl believe it or not, I am not just resulting posting here cause I want the easy way out or anything, this has been a tedious process, from google, sourceforge, php dev forums, linux forums, plesk forums.. etc..

This is a reply I got:
"There's no way you can grant shell access to any user with any shell and deny them the ability to read any world readable file on your entire server."

So you're telling me read or search google, do you guys know the anwer to this? Do you know if its possible or should the last comment be true?

I am amazed that a system such as linux doesnt have the ability to restrict a user read writes.

If you know anything, give us a hint plz.

fudgie

Reply With Quote
  #8  
Old 02-05-2004, 07:03 AM
jwr jwr is offline
roflcopter
 
Join Date: Feb 2004
Location: here and there
Posts: 723
'chmod 711' is your friend. If they know where a file is they can still read it, but you can generally hide the content of various directories, including / with it. For example, chmod 711 /home/ and /home/* is a good idea.

Alternately you could make your own kernel patch for whatever os (linux you said?) that restricted users. Perhaps there are security patches out that do this already? grsecurity? I'm not sure, I haven't used linux in a few years.

Reply With Quote
  #9  
Old 02-05-2004, 09:28 AM
Jon69 Jon69 is offline
Junior Guru Wannabe
 
Join Date: Apr 2003
Location: Sunny UK
Posts: 33
Would Jail be an option? I can't post the URL here because of my lack of posts but you can find it on google.

Its works fine for me via WHM and cPanel but I'm sure it's not too difficult to set up via SSH.

Reply With Quote
  #10  
Old 02-05-2004, 10:55 AM
l0ck_up l0ck_up is offline
Pixellegion
 
Join Date: Dec 2003
Posts: 501
Quote:
Originally posted by Jon69
Would Jail be an option? I can't post the URL here because of my lack of posts but you can find it on google.

Its works fine for me via WHM and cPanel but I'm sure it's not too difficult to set up via SSH.
Jail will be an option, and of course there're other ways to give access SSH to your users, CHMOD is one of option as well, however it's still not save to give access to SSH, if one attacker can't access your "root", they still can access other account, or make any flood of attack on your box.
Please think twice, SSH will be a good weapon to kill your box, telnet as well

Reply With Quote
  #11  
Old 02-05-2004, 01:14 PM
Jon69 Jon69 is offline
Junior Guru Wannabe
 
Join Date: Apr 2003
Location: Sunny UK
Posts: 33
Quote:
Originally posted by l0ck_up

Please think twice, SSH will be a good weapon to kill your box, telnet as well
Yeah, of course I agree. I was just trying to answer the orginal post

Reply With Quote
  #12  
Old 02-05-2004, 03:01 PM
fudgie fudgie is offline
Newbie
 
Join Date: May 2002
Posts: 15
I need to provide ssh access for one tech person to configure and test an application (only once) - that I dont want him to see or do a listing on vhosts directory and see domains listed.

So yes I know I should not allow anyone to access via ssh or telnet, but what can i do, I need this person in. yes i will try to

So how can I prevent a user from looking into a specific directory?

Has anyone managed to do this? does it need a specific restricted shell that can be configured in such a way?

Does this maybe provide any ideas to solution?
http://www.sunmanagers.org/pipermail...ch/000337.html

pre thanks
fudgie

Reply With Quote
  #13  
Old 02-05-2004, 05:54 PM
fudgie fudgie is offline
Newbie
 
Join Date: May 2002
Posts: 15
or go for this tedious way...
http://www.tjw.org/chroot-login-HOWTO/


Reply With Quote
  #14  
Old 02-06-2004, 07:26 AM
pmabraham pmabraham is offline
Web Hosting Master
 
Join Date: Dec 2001
Posts: 5,221

__________________
---
Peter M. Abraham
LinkedIn Profile


Reply With Quote
  #15  
Old 02-06-2004, 08:43 AM
fudgie fudgie is offline
Newbie
 
Join Date: May 2002
Posts: 15
dynamicnet - thank YOU!

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Posterous Shuts Down Today, Here Are Some Alternatives Blog 2013-04-30 17:26:02
Blacknight Lends a Hand to Users of Retiring Blog Platform Posterous Web Hosting News 2013-02-22 13:56:35
Carpathia and Electronic Frontier Foundation Aim to Help Megaupload Users Retrieve Legal Data Web Hosting News 2012-01-31 11:27:26
OpenDNS's New Technology Improves DNS Traffic Security Web Hosting News 2011-12-06 18:35:36
Email Security Firm eleven Expects Obselecense of Blacklist Anti-Spam Solutions Web Hosting News 2011-09-15 17:03:15


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?