HostOnNet Blog

ssh-keygen

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

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 "[email protected]"

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

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.