You are here: Home Tech Notes Linux Create Public/Private 4096 Bit SSH RSA Keys
Create Public/Private 4096 Bit SSH RSA Keys PDF Print E-mail
User Rating: / 0
PoorBest 
Tech Notes - Linux
Written by Rick   
Monday, 28 July 2008 17:43

To automate SSH login, a copy of the public key representing your system must be placed on the remote computer. These key are typically located in ~/.ssh/authorized_keys. Use the following command to create the keys in your local user directory;

            ssh-keygen -t rsa -b 4096 -f $HOME/$HOST-rsync-key

After creating the key either upload "-rsync-key.pub" file to the remote system's, root user's /.ssh directory. If the file "authorized_keys" does not exists simply rename the file you've uploaded to "authorized_keys", otherwise append the content of the rsync-key.pub to "authorized_keys" and delete the original file. 

Now you can login to the remote machine without being prompted for a password using the following command:

            ssh -i $HOST-rsync-key remoteuser@remotehost

Remember to check the permissions on "authorized_keys" and set them to 700. Also NEVER distribute the private key to ANYONE and maintain strict control of where you place your public key.

Note: If you reinstall  your operating system the key data will change requiring your to recreate rsa keys and redistribute.

 

Comments (0)
Write comment
Your Contact Details:
Gravatar enabled
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):S
:!::?::idea::arrow:
Security
Please input the anti-spam code that you can read in the image.