Load multiple password-protected OpenSSH keys

I have 2 SSH keys I need to load when starting SourceTree, which are password-protected.

Since I am on Windows and can't use Pageant (due to its lack of support to OpenSSH keys) I have to use OpenSSH, but it doesn't properly work:

  • if there is just one key added into SourceTree, a command line pops up asking me for the password (and it works)
  • if I add a second key through SourceTree (Tools -> Add SSH key), it asks me for the password (and it works)
  • if I close SourceTree and open it up again, a command line pops up and then immediately closes itself, thus failing to load both of my SSH keys

Is there a way to solve this? The only workaround is to re-add the SSH key I need just before fetching/pushing, if I remember I previously closed SourceTree or rebooted my PC.

1 answer

You can use the putty key generator to convert OpenSSH private keys to the format pageant prefers. They should still work fine with the openssh public keys.

I really don't want to keep multiple copies of my keys, isn't there another solution?

Do you use the private keys for something that requires the openssh format? The conversion can work both ways, so you could merely keep the ppk format for your private keys, and convert your public keys to openssh or putty's public keys as necessary. I generate all my keys with puttygen, and invariably have to convert my public keys to openssh for installation on linux servers.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

761 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you