SSH, or secure shell, is an encrypted protocol used to administer and communicate with servers. SSH key pairs are two cryptographically secure keys that can be used to authenticate a client to an SSH server. Each key pair consists of a public key and a private key. The following steps are required to set up public key authentication for SSH:
1) Copy the public key from the access server . Public key stored in the file id_rsa.pub . Generally its in the location ~/.ssh/ id_rsa.pub. You can use cat ~/.ssh/authorized_keys to see your public key.
2) Generate a public key using the command:
3) Login into remote server
4) Add your Public key to the file ~/.ssh/authorized_keys.If the account doesn’t have ~/.ssh/authorized_keys you can create one. on the command line, enter vi ~/.ssh/authorized_keys for open file.Paste your public key on the file.
5) Exit and save file. You can now ssh from your access server to remote server without password.