Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Bitbucket Cloud SSH keys rejected after 24 hours

SSH keys generated for a specific user in my workspace only work for about 24 hours. I've tried creating the SSH keys in the workspace as well as within the personal settings for that user's Bitbucket account.

The SSH keys loaded onto my personal account are working perfectly and have done so for months.

Once created they work for about 24 hours and thereafter she gets the "permission denied (public key)" error when attempting to perform any sort of operation (push, pull, fetch...)


1 answer

0 votes
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 11, 2022

Hi, @echoblue_marcus, thank you for reaching out to Atlassian Community.

This seems to be related to the key that is added to the ssh-agent. Either the agent is losing the key after 24h, or a different SSH key is being offered (if you have multiple keys in the .ssh directory).

The first thing I would suggest when you face this issue is to try to add this key to your agent again. You can run the following command to achieve this: 

ssh-add ~/.ssh/<private_key_file>

You can run the following command to confirm which key is being offered when interacting with your repo, to confirm if it’s the correct one or not: 

GIT_SSH_COMMAND="ssh -vvv" <git command> 

And you can also try specifying the private SSH key in the config file. You can add the following to the file named config in your ~/.ssh directory (if the file named config doesn't exist, you can create it): 

    User <YourBitbucketUsername>
    PreferredAuthentications publickey
    IdentityFile </Users/YourUser/.ssh/my_ssh_key>

Replace YourBitbucketUsername with your Bitbucket username and /Users/YourUser/.ssh/my_ssh_key with the path to the private key that is added to your Bitbucket user.

Please let me know how it goes and feel free to share any additional information regarding this case.

Kind regards,

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events