Forums

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

ssh error on deploy

Peter Surrena
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!
June 17, 2019

Hello,

I'm new to BB Pipelines and I'm and as a first step, I'd like to deploy to my staging server on a push. I get the following error when I push:

bash: ssh: command not found

Is SSH not working or is this referring to the bash script?

My config file is:

image: php:7.1.29

pipelines:
default:
- step:
name: Install ssh
script:
- apt-get update -y
- apt-get install -y ssh
- step:
name: Deploy to Staging
script:
- sh deploy.sh | ssh username@12.34.567.890
- echo "Deploy step finished"

 

Am I approaching this incorrectly?

1 answer

0 votes
Antoine Büsch
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 25, 2019

Hi Peter,

Each step is independent and executes in a fresh docker environment, so even though you're installing ssh in the first step, it won't be available in the second step.

My suggestion is to either install ssh and run your deploy script in the same step, or use a base docker image that already has ssh installed.

Hope this helps!

Antoine

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events