Configure SSH Key Authentication Only

Configure SSH Key Authentication Only

Configure CentOS SSH Key Autnentication Only

For this blog we are going to go over setting up a SSH server for key-only authentication. Here’s the basic process:

SSH key-only setup: For this blog we are going to go over setting up a SSH server for key-only authentication. Here's…

from here we need to edit the ssh config

SSH key-only setup: we need to edit the ssh config

un-comment lines 47, and 48

SSH key-only setup: un-comment lines 47, and 48

now generate the SSH keys via Linux

SSH key-only setup: generate the SSH keys via Linux

now set permissions to only allow root access to the keys

SSH key-only setup: set permissions to only allow root access to the keys

from here copy the key to a remote system, and verify you can login

view the public key using VI

SSH key-only setup: view the public key using VI

from here copy the encrypted string to another user account ,and vi the un-created “authorized_keys” file

SSH key-only setup: copy the encrypted string to another user account ,and vi the un-created "authorized_keys" file

copy/paste into the file, save, and test to make sure you have passwordless authentication.

From here change line 64 in the SSHD config to no, make sure that keyless authentication works, otherwise you are oficially locked out after the next step.

SSH key-only setup: change line 64 in the SSHD config to no, make sure that keyless authentication works, otherwise you…

now restart the ssh service

SSH key-only setup: restart the ssh service

That’s it!

Hosted Linux Servers at www.zwiegnet.com/go

Related guides: Allow SSH Connections Fedora 19 | Allow root SSH Login Amazon EC2

4 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *