Give access to someone via SSH key

greektranslator

Well-Known Member
Jun 5, 2011
58
0
56
Greece
cPanel Access Level
Root Administrator
How do I setup server access for a third party via an SSH Key? Do I ask them for their public key? If yes, where do I put it and how? I already use one to log in (I have used SSH Password Authorization Tweak to disable root log in). I use CENTOS 7
 
Last edited:

ronaldst

Well-Known Member
Feb 22, 2016
85
16
8
Norway
cPanel Access Level
Root Administrator
If the user in question got a cPanel account he can add his own key from the control panel.

It's also possible to give access to SSH directly from the web terminal function in cPanel (introduced a while ago).

If none of these options are viable, he would need to give you the public key for you to add to his account.

The public key is added to the file /home/username/.ssh/authorized_keys.

If setting this up manually you got to make sure file permission to .ssh directory (0700) and authorized_keys (0600) file is set correctly and owned by the user.

There is a lot of documentation to how set up and secure SSH on the internet. RedHat documentation is a good place to start if you are new and want to learn more.
 
Last edited:
  • Like
Reactions: cPanelLauren