LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to give access to user only home directory through ssh? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-give-access-to-user-only-home-directory-through-ssh-4175420570/)

jeevar 08-06-2012 12:32 AM

How to give access to user only home directory through ssh?
 
Okay...

Create user and add the user into rbash.

like
cat /etc/passwd

jeeva:x:100:101::/home/jeeva:/bin/rbash

suicidaleggroll 08-06-2012 08:51 AM

Impossible. The user MUST have access to at least a few directories/files/devices outside of their home directory or they can't log in. For example, you want them to run /bin/rbash, but if they can't see anything outside of /home/jeeva, then how could they?

The simplest way to restrict them to ONLY those directories/devices/files that they need is to set up a chroot jail.


All times are GMT -5. The time now is 10:15 PM.