Solved

linux ssh

Posted on 2016-11-20
4
69 Views
Last Modified: 2016-11-28
Hi,

I am trying to allow other users to access a linux server using ssh with a key file.    I want to direct the path for each user.  How would i add this to the sshd_config file?   I am terying to add by user
0
Comment
Question by:Eric Donaldson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 29

Expert Comment

by:serialband
ID: 41895317
Put the key in each user's account and have them use sudo to get access, so there's a bit better tracking of users in the logs.
0
 

Author Comment

by:Eric Donaldson
ID: 41895758
Thanks, I prefer not to use sudo access.  Can I just add another link with the users home directory to the sshd_config file?
0
 
LVL 78

Accepted Solution

by:
arnold earned 500 total points
ID: 41895934
Please Clarify what you want.

Add user.
Add key to users ~/.ssh/authorized_keys2 file
Add a symbolic link in the user's home dir the location where you want them to have access.
In ~/, ln -s /some/path remote_folder
You can set that in /etc/skel so it will be auto added to each user created.


You could alternatively, set each user's hone dir as the destination, but then the would be in a position to edit .ssh/authorized_keys2 where all users keys will be...

As noted, unless you institute cvs, subversion to make sure changes are tracked, a user may err and delete, modify a file ....
Without you being able to tell when, who, why changes were made.
0
 
LVL 29

Expert Comment

by:serialband
ID: 41896215
If you're just having users access the system, then you create user accounts with their own home directory.

If you're going to give them root access, there's only one root account with a fixed home directory for root.  It's better to give them sudo in that case.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
When trying to install php-fpm on CentOS 7 - GPG error 2 102
python - find anything after $ question. 9 52
RPM creation 6 26
Certificate Request CentOS/Apache 1 25
AWS Glacier is Amazons cheapest storage option and is their answer to a ‘Cold’ storage service.  Customers primarily use this service for archival purposes and storage of infrastructure backups.  Its unlimited storage potential and low storage cost …
Monitoring systems evolution, cloud technology benefits and cloud cost calculators business utility.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question