«

»

Mar 29

How to create SSH key

Creation of SSH public and private key

To create an SSH key, you make use of the ssh-keygen program as follows:

root@server [~]# ssh-keygen -t rsa -b 1024

Now it will ask a few details and finally ask to enter a secret pass phrase. After you have

entered the pass phrase, it will generate two keys. A public key by name ‘id_rsa.pub’ and a

private key by name ‘id_rsa’. And these keys will be stored in a hidden directory called .ssh

in your home folder.

Next you have to copy just created public portion of your key to the remote machine.

root@server [~]#scp ~/.ssh/id_rsa.pub root@serverIP:.ssh/authorized_keys

Above, I have copied the id_rsa.pub key to the .ssh folder of the remote machine and named it

authorized_keys. Now remote_mc is ready to accept your ssh connection

You are Done.


contact@webhostingsupport.info

Post to Twitter

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>