Solved

linux ssh

Posted on 2016-11-20
4
59 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
  • 2
4 Comments
 
LVL 28

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 77

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 28

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

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 …
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

861 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now