Wednesday, April 13, 2011

generate ssh keys

http://wiki.ocssolutions.com/Generating_an_SSH_key#Webmin_Users

Webmin Users

Connect to your account via SSH and issue these commands:

ssh-keygen -t dsa 

Just hit enter on all questions, the defaults are fine. Do not enter a passphrase unless you want one.

Then run,

mv ~/.ssh/id_dsa.pub ~/.ssh/authorized_keys chmod 0700 ~/.ssh chmod 0600 ~/.ssh/* chmod 0751 ~ cat ~/.ssh/id_dsa 

When you run the last command, it will display the private key. Copy and paste that key into a text editor and save it as id_dsa. Alternatively you can download it using FTP or SCP. Either way, delete the file once you've saved it as you don't need it on the server anymore (and in fact, do NOT want it on the server), via FTP, or by running:

rm -f ~/.ssh/id_dsa 

It is now ready for use in your SSH client of choice. See Connecting via SSH for more information.

No comments:

Related Posts Plugin for WordPress, Blogger...