Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,301,314
Community Members
 
Community Events
165
Community Groups

Bitbucket Pipelines SSH credentials do not work

Edited

I followed this instruction

https://confluence.atlassian.com/bitbucket/use-ssh-keys-in-bitbucket-
pipelines-847452940.html

and I made:

1. I created SSH key using in Settings -> Pipelines - SSH Keys.
2. I copied this public key to ~/.ssh/authorized_keys on the remote host.
3. I added the IP of my server to
Known hosts.

I have such bitbucket-pipelines.yml:

image: php:7.1.1

pipelines:
custom: # Pipelines that are triggered manually
deployment-to-prod:
- step:
script:
- apt-get update && apt-get install -y unzip
- apt-get -y install openssh-server
- ssh webmaster@XXX.XXX.XX.XX sh /home/webmaster/scripts/update_live.sh


When I run this pipeline I have:

apt-get update && apt-get install -y unzip15s
apt-get -y install openssh-server2m 43s
ssh webmaster@XXX.XXX.XX.XX sh /home/webmaster/scripts/update_live.sh<1s
+ ssh webmaster@XXX.XXX.XX.XX sh /home/webmaster/scripts/update_live.sh 
Permission denied, please try again.
Permission denied, please try again.
Permission denied (public key, password).
 
My questions:
1. Why my Docker machine cannot establish SSH connection (Permission denied)?
2. Do I really have to install openssh-server? Without it 'ssh' command cannot be recognized (No such file or directory).

1 answer

I have the same issue. Where you able to solve this problem?

Have you resolved this Issue?

Suggest an answer

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,265 views 2 9
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