ssh-keygen

ssh-keygen command is used to create SSH key used for password less login.

To create SSH key, run

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

By default SSH keys will be stored in .ssh folder on your home directory.

Your public key will be ~/.ssh/id_rsa.pub, this you can share with others.

To enable password less authentication to a server, you need to copy content of ~/.ssh/id_rsa.pub (your public key) to file ~/.ssh/authroized_keys in remote server. You can also do this with command ssh-copy-id.


Posted in Linux