Link to home
Start Free TrialLog in
Avatar of ittechlab
ittechlabFlag for Canada

asked on

ppk format - ssh keys not working

putty agent setup.

I have created public key/private keys using ssh-keygen command in my linux box.

i got the following files.

id_rsa
id_rsa.pub

I did setup my putty configuration to allow agent forwarding.  I did launch pagent.exe file and tried to import my id_rsa.pub key and it is expecting a key with the ppk format.

- do we add public key or private key
- how do i convert the ssh keys to ppk format.
Avatar of ittechlab
ittechlab
Flag of Canada image

ASKER

[smith@localhost .ssh]$ ll
total 8
-rw-------. 1 smith smith 1675 Jun  1 11:09 id_rsa
-rw-r--r--. 1 smith smith  409 Jun  1 11:09 id_rsa.pub
Avatar of Zach Shaver
Hi,

You can create ppk keys using PuTTYgen

https://www.ssh.com/ssh/putty/windows/puttygen

Best regards,
Zach Shaver
Unable to use key file "C:\Users\OneDrive\Desktop\keys\smith\privatekey.ppk" (SSH-1 private key)
Using username "smith".
smith@192.168.2.220's password:
Are you trying to use the keys from the linux box?  You'll have to copy the private key from the linux box to your Windows box and convert it.  Load up PuttyGen.exe and Click on Conversions at the top and Select Import Key.  It will prompt you for your passphrase if you've created one.  Once loaded, you can then save the Private and Public keys.  You'll also have to load the id_rsa.pub key into the ~/.ssh/authorized_keys file

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys file

Are you trying to use your Windows key?  You'll need to copy the public key to the linux box and load it into the ~/.ssh/authorized_keys file.


Afterwards, run pageant.exe and load your private key and enter your passphrase, assuming you used a passphrase as best practices.
I found the issue.  ssh-rsa missing in the file.

[root@logserver .ssh]# cat authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQB1WuW/sSOS7fBeiCcQK0piog2VV1mv2PBpjmirfXfubcntALodBV8BUXcAGObvriUyQzYCnlId0nKG9WnjWN3+HpdB3monckCEFrSfro6+2IbsISnQQl94C6/bYwnNjH........... (output omitted)
ASKER CERTIFIED SOLUTION
Avatar of ittechlab
ittechlab
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
.
.
.
 You'll also have to load the id_rsa.pub key into the ~/.ssh/authorized_keys file

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys file
.
.
.

I believe I did suggest that in my previous message.