1757951 Members
2486 Online
108866 Solutions
New Discussion юеВ

RSA key generation!!

 
ajay_25
Occasional Contributor

RSA key generation!!

HI All,

redhat 7.1
ajay@sshserver ajay$ssh-keygen

generated key pair and given passphrase

ajay@sshserver ajay$cd .ssh
ajay@sshserver .ssh$cat identity.pub > authorized_keys
ajay@sshserver .ssh$chmod 644 authorized_keys

copy identity(private key) to my windows box. thru putty ..using private key(identity) by typing passphrase i can login to my sshserver.

redhat 7.3, 9 ..

kumar@sshserver1 kumar$ssh-keygen -t rsa

generated key pair and given passphrase

kumar@sshserver1 kumar$cd .ssh
kumar@sshserver1 .ssh$cat id_rsa.pub > authorized_keys
kumar@sshserver1 .ssh$chmod 644 authorized_keys

copy id_rsa to my windows box.thru putty ... using private key(id_rsa) i cant login to my sshserver1.

error is
no passphrase required.couldn't load public key

i tryed ssh-keygen instead of ssh-keygen -t rsa ...but in redhat 7.3 and 9 that dint work... may be ssh1 protocol not supported in 7.3 and 9..(in my idea)

how to solve this problem ??

please any one help me..i am really vex with this problem...

thanks in advance.
ajay
4 REPLIES 4
Abdul Rahiman
Esteemed Contributor

Re: RSA key generation!!

Ajay,

Check the ssh versions & protocol dfference between the two Redhat releases.
#ssh -V
If the later versions are running ssh protocol 2, change the authorized_keys filename to authorized_keys2 and try again.

regds,
Abdul.
No unix, no fun
ajay_25
Occasional Contributor

Re: RSA key generation!!

hi Abdul,
i tryed in that way...but still i cant.
Matti_Kurkela
Honored Contributor

Re: RSA key generation!!

When creating a key with "ssh-keygen -t rsa" you get a protocol version SSH2 RSA key.

Two possibilities come to my mind:
1.)
Some versions of PuTTY try SSH1 protocol first by default. When trying to use SSH2 keys, you must use SSH2 protocol.

2.)
SSH2 keys must be imported to PuTTY's native format (.PPK) using PuTTYgen, says PuTTY FAQ.
This is because there is no "standard" format for storing SSH2 keys: OpenSSH uses one format, the ssh.com commercial version uses another. Looks like you might have tried to use OpenSSH-like key directly without importing. That does not work.
MK
Franky_1
Respected Contributor

Re: RSA key generation!!

Hi,

why don't you create dsa keys using

ssh-keygen -t dsa and import them in the "authorized_keys2" file

Regards

Franky
Don't worry be happy