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!


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
Community Members
Community Events
Community Groups

Unable to find image 'bitbucketpipelines/ssh-run:0.4.0' locally

Hi all,


I'm new to pipelines, so probably am doing very obviously wrong.
I'm starting out simple, and basically copying the templates provided.


image: node:16




      - step:

          name: Test


            - cd Server/Source

            - npm install

            - npm test

      - step:

          name: Pre-Deploy


            - pipe: atlassian/ssh-run:0.4.0


                SSH_USER: 'root'

                SERVER: ''

                SSH_KEY: $ssh_key

                MODE: 'command'

                COMMAND: '/root/dir/' # path to a script in your repository

The `test` step executes without a problem.
However, I can't run the ssh command

Help, please? :)

+ docker container run \
--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
--volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/ssh-run:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/ssh-run \
--workdir=$(pwd) \
--label=org.bitbucket.pipelines.system=true \
--env=CI="$CI" \
--env=DOCKER_HOST="tcp://host.docker.internal:2375" \
--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/ssh-run" \
--env=COMMAND="/root/squawker/" \
--env=MODE="command" \
--env=SERVER="" \
--env=SSH_KEY="$ssh_key" \
--env=SSH_USER="root" \
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
Unable to find image 'bitbucketpipelines/ssh-run:0.4.0' locally


3 answers

1 accepted

0 votes
Answer accepted

@Syahrulwas right - I changed how I supplied the SSH key., and it runs fine, now.
I'd prefer there was a nicer error message, but it's all functional.

Thanks 👍


there is no html!!

0 votes
Syahrul Atlassian Team Feb 27, 2022

Hi @capsicumdreams 

Apologize for the confusion, the error you mention "Unable to find image 'bitbucketpipelines/ssh-run:0.4.0' locally" is a completely fine error as the pipe is not stored locally so it won't be able to find it hence the error.
The build will then proceed to download the image from Docker afterward so you can safely ignore the error.

Now as for why the pipe did not trigger the SSH commands, I would suggest you enable the debug mode in the pipe to get more information. Below are an example of enabling the debug mode:

  - pipe: atlassian/ssh-run:0.4.0
      SSH_USER: 'ec2-user'
      SERVER: ''
      COMMAND: 'echo $HOSTNAME'
      DEBUG: true

Once you get the output, feel free to share it here if you can't find out why it's failing, but do filter out any sensitive information first before sharing.


Thanks, Syahrul,


I've spent 45 minutes trying to type out a reply - but it complains that I'm sending the same message too often.
"Update your text, or wait before reposting."

I have done both. For over half an hour, so far.



Here is a Onedrive link to a reply that isn't blocked by your overly-ambitious spam system.!AkuYD2UOMAw_iqwzZBtMfET6kmdJAQ?e=Yy0qHE


Thanks a lot for trying to help..

Syahrul Atlassian Team Feb 28, 2022

Hey @capsicumdreams ,


Sorry to hear you are having an issue with the community text post, most likely an issue with too many logs to share.

I try opening the link but it's empty for me without any logs/data could you check and confirm that or share using another alternate method such as google drive etc?


Having serious difficulty even responding using this editor.
Do you guys need some software engineers?

It seems only Microsoft Edge is supported? 🤦🏻‍♂️


Thanks for getting back to me..

Still unable to execute ssh-run with a meaningful pass/failure..

Unable to find image 'bitbucketpipelines/ssh-run:0.4.0' locally
0.4.0: Pulling from bitbucketpipelines/ssh-run
31603596830f: Pulling fs layer
c507f8e37a23: Pulling fs layer
7eca4d8c4c7b: Pulling fs layer
c21a713484c2: Pulling fs layer
c21a713484c2: Waiting
7eca4d8c4c7b: Verifying Checksum
7eca4d8c4c7b: Download complete
31603596830f: Verifying Checksum
31603596830f: Download complete
c507f8e37a23: Verifying Checksum
c507f8e37a23: Download complete
31603596830f: Pull complete
c21a713484c2: Download complete
c507f8e37a23: Pull complete
7eca4d8c4c7b: Pull complete
c21a713484c2: Pull complete
Digest: sha256:2aa2f6517fb364da07a18f8b1e55b651c1db0361f7a850b79914c8da663f709e
Status: Downloaded newer image for bitbucketpipelines/ssh-run:0.4.0
INFO: Executing the pipe...
INFO: Using passed SSH_KEY
base64: truncated base64 input

Is `base64: truncated base64 input` interesting?

Syahrul Atlassian Team Mar 20, 2022

Hi @capsicumdreams 

Looking at the error log "base64: truncated base64 input" and your YAML setup, I believe the reason why it returns the error is because the SSH key you saved in your variables is truncated hence it's rejecting the key.

Instead of applying your own SSH key, you can follow these steps:

  1. navigate to the repository setting
  2. Under pipelines click SSH keys and generate new keys.
  3. Copy the public keys and save them on your server at ~/.ssh/authorized_keys
  4. Once done, update your YAML as follows:
      - step:
          name: Pre-Deploy
            - pipe: atlassian/ssh-run:0.4.0
                SSH_USER: 'root'
                SERVER: 'IP'
                MODE: 'command'
                COMMAND: '/root/dir/' 

I hope this helps, more information on using SSH key with the pipeline, please checks our documentation at


Like capsicumdreams likes this

Great, thanks - I'd prefer to look at the key I supply rather than add a key to the server.
I'll try that... 👍

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events