Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

My SSH key has gone missing from my account and I can't add it back. What can I do about this?

I have been working on a project for a few weeks now using ssh key. However today I tried to push some changes and received this error:

kex_exchange_identification: read: Operation timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I then tried again and received a similar but slightly different error:

kex_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

When I saw this I went a checked both the access keys for the repo and my account SSH keys. The repo access keys was empty and said 'there are no keys configured' Screenshot 2021-11-29 at 10.42.14.png. My account ssh keys only had a default public keyScreenshot 2021-11-29 at 10.42.41.png.

I then tried to add my ssh key back to both the repo and my account, however, when I did I would be told 'Someone has already added that SSH key to another account'. When Looking online to resolve this I came across this command 

ssh -T

This would give me an error again 

kex_exchange_identification: read: Operation timed out


I only have one account and have only used the one SSH key.


1 answer

1 accepted

0 votes
Answer accepted

Hi Daniel and welcome to the community!

Access keys that are added to a repo provide read-only access to repositories. If you add an SSH key to a repo, you will only be able to clone and pull this repo and not push.

If you want to be able to push via SSH to repos you have access to, the public SSH key needs to be added to your account (like in the second screenshot you attached). In that screenshot, there is a key listed. If you select the pencil icon in that entry, you'll be able to view the public SSH key and check if it's the same as the public key on your machine. If they are the same, then this shouldn't be an issue.

  • Are you perhaps connected to a different network now (different from the one when the push was succeeding) or are you still using the same network?
  • If you're behind a firewall, you may need to whitelist our IP addresses to be able to reach Bitbucket:
  • Are you able to push using git push -4 ? This will use IPv4 addresses only, and I'm asking you to check because I've sometimes seen this error occur when IPv6 is used and there is some misconfiguration.
  • Are you able to push to the repo using HTTPS? I ask this so we can narrow down if the issue seems to be specific to SSH or not. If it works, you could also use HTTPS as a workaround until we figure out the SSH issue, so you can push your changes.

If you have any questions, please feel free to let me know.

Kind regards,

Hey, thank you for the answer.

I believe I was having the problem as I was on a different network. Now I'm back on the network I usually use and everything works as normal.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

⭐ Calling all Bitbucket and DevOps experts: Special showcase opportunity ⭐

Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...

1,441 views 4 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you