Ssh certificate authentication landing implementation tutorial

  
 

The server and the server perform scp. The password authentication requires a lot of inconvenience and security risks. The ssh certificate authentication can be easily used for backup and copy, which improves the security performance.

The method is as follows: on server A: create a key [root@localhost ~]# ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/root/. Ssh/id_rsa):Created directory '/root/.ssh'.Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /root/.ssh/id_rsa.Your public key has been saved in /root/.ssh/id_rsa.pub.The key fingerprint is:

Then execute scp id_rsa.pub ip:.ssh/authorized_keyscat id_rsa.pub >> authorized_keys copy to server B, then server Repeat the operation of A on B to complete the two-way authentication. Note: If there is no .ssh under root, please create one.

Copyright © Windows knowledge All Rights Reserved