Changing the passphrase of a private key in Windows

Posted by janos on Server Fault See other posts from Server Fault or by janos
Published on 2013-06-27T16:51:29Z Indexed on 2013/06/28 10:23 UTC
Read the original article Hit count: 273

Filed under:
|
|

I have a private key in Windows, created by puttygen.exe. I used default options to save it, the tool automatically gave it a .ppk extension, and it looks like this:

PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: rsa-key-20130627
Public-Lines: 4
AAAAB3NzaC1yc2EAAAABJQAAAIBnvvAhyMs4rdlQd4OdajDw4jIPi6vIjrWjt4l4
5C3wHOSxyQQdtSA8XT3K0rSBnNtZRJTb5mfix67qQe3pHCTMSNsYIaBi8xQJHZRa
RxdY+1VtGnSlEma8KO2We9eDNCGiwrRTUzqvTiGCnzU0pF1MXxu3ObISJcpqv+sQ
1GB0cw==
Private-Lines: 8
AAAA..........
Private-MAC: XXXXXXXXX

Now I need to change the passphrase, and reading from the docs it seemed simple enough:

puttygen.exe -P key.ppk

But this pops up a window with this error:

PuTTYgen Error: Couldn't load private key (unable to open file)

I also tried to change the passphrase using ssh-keygen that comes with Git Bash:

ssh-keygen.exe -p -f key.ppk

It asks for my old passphrase, but then it gives me the error Bad passphrase. Which is not true, because I can add the key in pageant.exe, and I am not mistyping the passphrase...

Anything else I can try to change or drop the passphrase?

© Server Fault or respective owner

Related posts about Windows

Related posts about ssh-keys

  • Is it reasonable to have multiple SSH keys?

    as seen on Super User - Search for 'Super User'
    So far I've created a separate SSH key for each server I need to login to (for each purpose, to be more accurate). I did it out of a sense of security, just like different passwords to different sites. Does having multiple SSH keys actually improve security? All of them are used from the same machine… >>> More

  • Ubuntu Github ssh keys issue

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I followed every step given in this guide: http://help.github.com/linux-key-setup/ When I get to the end I am able to ssh to [email protected], getting the response: PTY allocation request failed on channel 0 Hi AlexBaranosky! You've successfully authenticated, but GitHub does not provide shell… >>> More

  • Problem with shared ssh keys

    as seen on Super User - Search for 'Super User'
    Following the process I've used in other environments (http://www.trilug.org/pipermail/trilug/Week-of-Mon-20080602/054712.html), I've tried setting-up shared keys between my Mac and my CentOS 4 webserver. I've seen the same problem with my older Ubuntu 7.10 workstation trying to connect via keys to… >>> More

  • Invalidating unused ssh keys

    as seen on Server Fault - Search for 'Server Fault'
    I am using one ssh account for all my Subversion users. They send me their public keys and I put them in .ssh/authorized_key of the svn account, then they can check out the code from Subversion using ssh tunnel. So far everything works fine. The problem though is that I want to invalidate keys that… >>> More

  • SSH keys fail for one user

    as seen on Server Fault - Search for 'Server Fault'
    I just set up a new Debian server. I disabled root SSH and password auth, so you've gotta use a key file. For my primary user, everything works exactly as expected. I used ssh-keygen -t dsa and got myself a public and private key. Put one in authorized keys, put the other in a pem file locally. I… >>> More