Cannot add SSH key via Sourcetree

Following directions for Set up SSH with Sourcetree on Windows at

consistently ends with the following error at the bitbucket site:

Key is not long enough. Bitbucket requires RSA keys be at least 2048 bits.



2 answers

In Putty Key Generator window change the value in the last option (number of bits in generated key) to 2048.



0 vote

You'll need to either make a longer RSA key or use a different type of key.

If you want to make a longer RSA key, there should be an option at the bottom of the PuTTY key generator where you can specify a length. As the message indicates, you'll need to make one that's at least 2048 bits long.

If you want to use a different type, newer versions of PuTTY also support ECDSA or Ed25519 - there should be an option for those at the bottom of the window, if your version of PuTTY support them. (Those types of key do not need to be 2048 bits long; ECDSA keys can be 256, 384, or 521 bits, and Ed25519 keys are all 256 bits.)

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
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,967 views 1 5
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