1832757 Members
3141 Online
110045 Solutions
New Discussion

ssh-keygen

 
Prashant Zanwar_4
Respected Contributor

ssh-keygen

I am trying to generate key on one host and copying it to other host.
1> one host I am just having ssh version 1,
which has ssh-keygen and generates id_dsa or id_rsa or identity..
2> I have ssh version 2 on other host, where I want to copy keys..
How to go about this..
I update authorization file, or authorized_keys2.. ?

Please reply
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
2 REPLIES 2
Geoff Wild
Honored Contributor

Re: ssh-keygen

This is what I do:

As the userid you want to use, cd ~USER
mkdir .ssh
chmod 700 .ssh
cd .ssh
ssh-keygen -t rsa -f id_rsa

That will create id_rsa and id_rsa.pub

Add the contents of id_rsa.pub to the ~USER/.ssh/authorized_keys file on a remote host (you may have to create the file if not there already).

Then, as that USER, you should be able to ssh without being prompted for a password.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Bharat Katkar
Honored Contributor

Re: ssh-keygen

Hi,
See if the thread below helps.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=969004

Regards,
You need to know a lot to actually know how little you know