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/id_rsa.pub
cat ~/.ssh/id_rsa.pub

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.