Solved

linux ssh

Posted on 2016-11-20
4
32 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 27

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 76

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 27

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

If you are thinking of adopting cloud services, or just curious as to what ‘the cloud’ can offer then the leader according to Gartner for Infrastructure as a Service (IaaS) is Amazon Web Services (AWS).  When I started using AWS I was completely new…
Monitoring systems evolution, cloud technology benefits and cloud cost calculators business utility.
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

18 Experts available now in Live!

Get 1:1 Help Now