Advertisement

01.05.2008 at 03:52AM PST, ID: 23060604
[x]
Attachment Details

Restricting remote SSH access to particular directories?

Asked by mjcoyne in Linux Administration, Linux Setup, SSH / Telnet Software

Tags: access, ssh

I have a Linux box that I use as a small web, mail, and file server.  Up until now, there were no users or administrators other than me.  Now, however, I've agreed to help out a friend and host a web site for him, which he'll design and administer.

In order to allow him to administer the site, I need to grant him FTP and shell access from a Windows client, preferably via SSH, but I'd prefer to limit his shell and FTP access to particular directories (say access to /var/www and below is required, and additional access to his /home directory, though not required, would be a nice touch).

How does one do such a thing?  I was reading a bit about setting up chrooted SSH (see http://www.howtoforge.com/chroot_ssh_sftp_fedora7), but this is a working web server hosting a handful of domains that I administer.  It seems I would need to restructure the /var/www tree quite a bit to set up the SSH chroot environment, at least using the procedure outlined at the above link, and I don't really want to screw around with the /var/www directories.  I could set his account's home directory to be /var/www, but I'm pretty sure that alone will not disallow roaming throughout the system.

The server is running Fedora 7 and OpenSSH 4.5.  Any ideas, discussion, suggestions, rants, epiphanies, or requests for further information welcome.
Start Free Trial
[+][-]01.05.2008 at 09:19AM PST, ID: 20589726

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.05.2008 at 10:12AM PST, ID: 20589969

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.05.2008 at 10:21AM PST, ID: 20590008

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.05.2008 at 10:28AM PST, ID: 20590037

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Linux Administration, Linux Setup, SSH / Telnet Software
Tags: access, ssh
Sign Up Now!
Solution Provided By: PeturIngiEgilsson
Participating Experts: 2
Solution Grade: A
 
 
[+][-]01.06.2008 at 01:07AM PST, ID: 20593239

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.12.2008 at 05:45AM PST, ID: 20643760

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.20.2008 at 11:35AM PST, ID: 20702115

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628