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

Incorrect command in BitBucket SSH setup for MacOS?

Bitwise DEVS
Contributor
September 2, 2023

Hi, I recently followed https://support.atlassian.com/bitbucket-cloud/docs/set-up-personal-ssh-keys-on-macos/

Unfortunately the command for checking running SSH agent is not working giving me.

No user named 'xc'

 But after trying the below command it seems I got what the documentation wanted me to do.

ps aux | grep ssh-agent

 This gives me something similar response from the expected output.

username  40101   0.0  0.0 408635088   1392 s000  S+    3:51PM   0:00.00 grep ssh-agent

 

Also why do we need to add config file under .ssh folder if we already executed ssh-add command? If I understand correctly both steps just do the same thing. The step for ssh config is also incorrect and will not work based on the previous step, since the creation of private and public key is in the home directory while the suggested ssh config is IdentityFile is pointing inside .ssh folder.

3 answers

2 votes
Joakim B_
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!
November 27, 2023

For anyone who ended up here like me because of the error No user named 'xc' when typing ps -auxc | grep ssh-agent in Terminal, the command OP wrote is slightly wrong.

The correct command is:

ps auxc | grep ssh-agent

 

Bitwise DEVS
Contributor
December 20, 2023

Nope, this is not working on my end and prints nothing on my terminal. I tried different approach but only the above command is what working on me.

2 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 4, 2023

Hi @Bitwise DEVS,

Thank you for your feedback. I will reach out to the team that maintains the documentation both for the command ps -auxc | grep ssh-agent and also for the paths in the ~/.ssh/config file. By default, the SSH key pair is generated in the ~/.ssh directory.

Also why do we need to add config file under .ssh folder if we already executed ssh-add command?

If you restart your computer and the key is not added to the agent after the restart, or if you have multiple SSH keys added to your agent, then the correct one may not be offered when you try to clone, pull, or push to a Bitbucket Cloud repo. The config ensures that the key you have added to your Bitbucket Cloud account will be used every time you clone, pull, or push to a Bitbucket Cloud repo via SSH.

Please feel free to reach out if you have any other questions!

Kind regards,
Theodora

Bitwise DEVS
Contributor
September 4, 2023

Thanks for answering, however based on the instruction from the documentation the generated SSH key pair will actually be in the root of home directory by default and there is no .ssh directory from a fresh setup on MacOS Ventura.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 5, 2023

You are right, the SSH key pair is generated in the ~/.ssh directory by default when the -f argument is not used. Apologies for the confusion caused by this. I will pass this on to the documentation team as well.

Regards,
Theodora

Navin ES
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!
November 26, 2023

The first part of OPs comment re: the incorrect command to check if the SSH agent is running, is still not fixed. Ref: https://support.atlassian.com/bitbucket-cloud/docs/set-up-personal-ssh-keys-on-macos/

1 vote
jeevansonm
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!
January 31, 2024

I ended up here due to the mistake in the official documentation. Please correct it as early as possible.

Correct command,
 

ps aux | grep ssh-agent

Suggest an answer

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

Atlassian Community Events