HostOnNet Blog

Generate SSH Key for Password less Auth

Looking for Linux Server Admin or WordPress Expert? We can help.

SSH Errors

SSH key is stored in .ssh folder on your home directory. To see if you have SSH key, run

cat .ssh/id_rsa.pub

If you don’t have one, generate SSH key with

ssh-keygen -t rsa -b 4096 -C "[email protected]"

ssh-keygen

This will create SSH public and private key in your home directory. The location will be

/home/USER/.ssh

Your private key will be

/home/USER/.ssh/id_rsa

This is PRIVATE, never ever share it with anyone.

Your public key will be stored at

/home/USER/.ssh/id_rsa.pub

It is public, it is OK to share with anyone. If someone need to grand you access to their server with out password, they need to add content of this file to file named ~/.ssh/authorized_keys.

Posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.