LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-09-2015, 02:44 AM   #1
odie
LQ Newbie
 
Registered: Feb 2015
Posts: 1

Rep: Reputation: Disabled
Need Help Create ssh user who can only access one directory


hi linus guru,


Need your help, I would like to create ssh user that only has access to one folder

existing Directory: /home/aps/logs



user can only have read only access on logs folder

Thanks, appreciate your help..

Last edited by odie; 02-09-2015 at 06:15 AM.
 
Old 02-09-2015, 10:07 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,327

Rep: Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881
Quote:
Originally Posted by odie View Post
hi linus guru,
Need your help, I would like to create ssh user that only has access to one folder existing Directory: /home/aps/logs

user can only have read only access on logs folder
Please see the "Question Guidelines" link in my posting signature. You don't provide any details, such as version/distro of Linux, or what you've done/tried so far, or what version of SSH. Since 4.8.1, you have a "ChrootDirectory" directive, which you can see in the SSHD documentation, or in the man page of sshd_config. The easiest course of action is to set your user(s) to be in a particular group, then shove something like this:
Code:
Match group jailedusers
          ChrootDirectory /home/jailed
          AllowTcpForwarding no
Restart SSH, and any users in the "jailedusers" directory will ONLY see their home directory, and nothing else.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to create an FTP user with permission to access only one specific directory guhan.p Linux - Server 1 08-07-2014 11:56 AM
Create SFTP only user and allow access to already created directory amitpatil Linux - Server 10 06-05-2013 05:12 AM
[SOLVED] How to create a user, who can access only his home directory suresh.k Linux - Newbie 7 09-14-2012 08:25 AM
create user without creating user home directory aksharb Linux - Software 1 05-12-2011 05:21 PM
How to create SSH user without access to root directory victorsk Linux - Networking 1 08-07-2009 07:56 PM


All times are GMT -5. The time now is 09:07 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration