Difference between revisions of "Enable Public Key Authentication on SSH"

From Tech-Wiki
Jump to: navigation, search
(Created page with "Category:Linux In order to SSH to other systems without authentication, you must enable this feature on the server on /etc/ssh/sshd_config PubkeyAuthentication yes In a...")
 
 
Line 8: Line 8:
  
 
Now copy the public key to the server using:
 
Now copy the public key to the server using:
  client# scp ~/.ssh/id_rsa.pub user@server:/home/user/.ssh/authorized_keys
+
  client# scp ~/.ssh/id_rsa.pub user@server:~/.ssh/authorized_keys
  
 
The command below also automates this process above
 
The command below also automates this process above
 
  client# ssh-copy-id user@server
 
  client# ssh-copy-id user@server

Latest revision as of 20:07, 24 October 2017


In order to SSH to other systems without authentication, you must enable this feature on the server on /etc/ssh/sshd_config

PubkeyAuthentication yes

In addition, generate you public/private key par on the client

client# ssh-keygen

Now copy the public key to the server using:

client# scp ~/.ssh/id_rsa.pub user@server:~/.ssh/authorized_keys

The command below also automates this process above

client# ssh-copy-id user@server