Generating Public Key From Private Key In Linux

I had to allow one Linux server SSH access to another Linux box with key based authentication. So I executed the following commands:

ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/
cat ~/.ssh/

The output of the ‘cat’ command I pasted inside ‘~/.ssh/authorized_keys’ and it works perfectly.

Leave a Reply

Your email address will not be published.