Skip to main content

We convert the putty private key to openssh format



With authentication by a key on ssh, being connected with Windows, understood. What about the use of the same key, only for authentication when connecting from a computer running Linux? PuttyAgent for Linux is not, and Linux does not understand the .ppk format.



To do this, convert the private key from ppk format to openssh format. And the puttygen for linux utility from the putty-tools package will help us with this. In any case, such a package is present in the repository debian. :)

  # aptitude install putty-tools 

Actually, we convert the key from ppk to openssh:

  # puttygen private-key.ppk -O private-openssh -o private-key.txt 

Here, the -O parameter specifies the format in which the private key is converted. And -o means the name of the file to save.



Thus, the private key in the openssh format will be saved in the file private-key.txt .

On your computer, it will need to be copied into a special file - the storage of private keys:

  # cat private-key.txt> ~ / .ssh / id_rsa 


How do you rate the article?
Звёзд: 1Звёзд: 2Звёзд: 3Звёзд: 4Звёзд: 5 ( 2 ratings, average: 5.00 out of 5)
Loading...

Add a comment

Your email will not be published.