Friday 22 November 2019

ssh - using puttygen generated public keys in unix environment?




Possible Duplicate:
How to convert .ppk key to OpenSSH key *under Linux*?



(unix, here: ubuntu 10.4)


I know how to create ssh key pairs in unix (ssh-keygen) and how to do it in windows (puttygen). the missing part in my case would be how to use a keypair, generated in windows (puttygen), in a unix shell.


where do I need to put the public key, in this particular case, to use it as an ssh-key in git.



Answer



Ok, I think I didn't make myself quite clear but found the solution:



  1. start puttygen

  2. load private key

  3. Menu Conversions|Export OpenSSH key

  4. Save somewhere, Open, Copy content to clipboard, paste on linux into file: $HOME/.ssh/id_dsa

  5. (optionally) copy content of text area "Public Key for pasting into OpenSSH authorized_keys file", paste on linux into file: $HOME/.ssh/id_dsa.pub


you can now use this SSH key from a shell to login into remote systems.


side note: to seamlessly use git from windows putty in a linux shell to connect to git set these options in putty session:


enter image description here


(and you must put the public key in ~/.ssh/authorized_keys, sure..)


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...