IT Knowledge Base

Technical Repository

HowTo: Linux – Configure SSH-Key Based Authentication

Let’s assume that you have two servers, ServerA and ServerB. You want to be able to be able to use certificates to log onto ServerB from ServerA without having to type in a username and password. To do this, we need to generate a public and private key pair on ServerA and then copy ServerA’s public certificate over to ServerB.

1. On ServerA, create the public/private key pair. Do not create a pass phrase when generating the pair.

ssh-keygen -t rsa

Use the following command to copy ServerA’s public key to the remote host.

ssh-copy-id [email protected]

Leave a Reply