Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

linux ssh

Posted on 2016-11-20
4
Medium Priority
?
103 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 30

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 80

Accepted Solution

by:
arnold earned 2000 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 30

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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

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 …
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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…
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…
Suggested Courses

604 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