Forums

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

Permission denied (publickey) when trying to connect to server from BB Pipeline

Mathew Paret
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!
December 6, 2023

I am getting "Permission denied (publickey)" when trying to connect to server from BB Pipeline".

I am using BB generated SSH-Key for which the public key I have added to `./ssh/authorized_keys`.

In the same file I have configured my own public key that I use to connect from my laptop.

Both for the same user.

 

When I connect from my laptop using the key generated on my laptop it works.

 

But when BB Pipeline tries to connect it doesn't.

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 7, 2023

Hello @Mathew Paret ,

thank you for reaching out to Community!

Could you share with us what command you are using to connect to the remote server? Is it a direct ssh command in your script, or a pipe like the atlassian/ssh-run pipe? 

Additionally, would you please include the following SSH command in your pipeline

ssh -Tvvv <your server IP/domain>

then trigger the pipeline again and share with us the full log output? This will contain verbose logs for the SSH connection and we will have more information about which key SSH is attempting to use.

Please make sure to sanitize the logs to remove any sensitive information (such as the IP address of your server), as this is a public forum.

Thank you, @Mathew Paret !

Patrik S 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events