Bitbucket Pipelines SSH credentials do not work Edited

I followed this instruction

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

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

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/<1s
+ ssh webmaster@XXX.XXX.XX.XX sh /home/webmaster/scripts/ 
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?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

696 views 5 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you