Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Unauthorized even with ssh keys configured in profile

Erikson Ferreira
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 29, 2025

I have two SSH keys configured: one for my laptop and another for the testing server.

The laptop key works fine, but the key associated with my user on the server always fails with “unauthorized” whenever I try to pull or push a repository.

When I run: 

ssh -T git@bitbucket.org # or ssh -T hg@bitbucket.org

I get the response:

 authenticated via ssh key. You can use git to connect to Bitbucket. Shell access is disabled 

So the authentication seems to work, but Git operations with my server key are still failing.

The keys are already configured in my Bitbucket profile. At this point, I don’t know what else to try.

Has anyone experienced something similar or can point me in the right direction?

 

1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 1, 2025

Hi @Erikson Ferreira

Welcome to the community.

Could you try checking if the SSH key is being added to your SSH agent?

You can check this KB for more info: https://support.atlassian.com/bitbucket-cloud/kb/testing-your-ssh-authentication/

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events