Set up an SSH key: Circular logic

Platform: Windows 10

I am working my way through the article Set Up An SSH Key. I got to the point where the user is advised to enter

ssh -T git@bitbucket.org

I get Permission Denied. The article then advises:

If you get an error message with Permission denied (publickey), check the Set up an SSH key page for help.

In other words, the article refers you to itself! To put it mildly, this is NOT HELPFUL. Can anyone advise on what to do at this point, other than enter an infinite loop.

1 answer

0 vote

Yes, that is pretty rubbish, as the article doesn't tell you how to fix it.

The error usually means the server doesn't like your key, although it can sometimes mean the file the key is in is not secured properly and ssh doesn't like that either.

It's hard to tell what might be wrong with this, so we'd like more info.   Could you try

ssh -v -T git@bitbucket.org

That should be more wordy, most of which you don't need, but when it fails it should tell you why near the point of failure.

I actually fixed the  problem by re-generating the keys and accepting all the defaults.  This generates keys named id_rsa and id_rsa.pub. I also named my Bitbucket key id_rsa. Of course, this is computing by trail-and-error in that it is unclear why providing a non-default name caused a failure and why accepting the default name worked. If only the default name works then the user should not be provided the opportunity to supply a non-default name.

It works with non-defaults as well, but the default for bitbucket is to work with the default settings for keys.

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,986 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