Step 1: Create public and private keys using ssh-key-gen
ssh-keygen
Step 2: Copy the public key to remote-host using ssh-copy-id
ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host
Step 3: Login to remote-host without entering the password
ssh remote-host
ssh-keygen
Step 2: Copy the public key to remote-host using ssh-copy-id
ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host
Step 3: Login to remote-host without entering the password
ssh remote-host