Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

ubuntu@3.110.132.86: Permission denied (publickey). ✖ Execution failed.

Abhishek Kumar
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!
October 3, 2023

I am getting permision denied, after setting all bitbucket-pipeline.

 

image: atlassian/default-image:2

pipelines:
  default:
    - step:
        name: Connecting to EC2
        script:
          - echo "Deploying to dev..."

          # Convert SSH key to base64
          # - SSH_KEY_BASE64=$(echo $SSH_KEY | base64)

          - pipe: atlassian/ssh-run:0.6.1
            variables:
              SSH_USER: "ubuntu"
              SERVER: "IP"

              # Use base64 encoded key
              SSH_KEY: $SSH_KEY

              COMMAND: "touch file.txt"
              DEBUG: "true"

          - echo "Deployed!"

1 answer

1 accepted

0 votes
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 4, 2023

G'day @Abhishek Kumar 

Welcome to the community!

The error indicates that the connection to your server doesn't have the right permission.

As a start, I suggest reviewing our documentation on how to configure SSH with the pipeline:

Using SSH keys in Bitbucket Pipelines 

Also, make sure to add your IP host to the Known hosts Add the public key to a remote host or a Bitbucket repository 

Regards,
Syahrul

Abhishek Kumar
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!
October 4, 2023

Thanks @Syahrul

I am happy to know above message and helped me to solved problem..

 

Regards 

Abhishek 

Suggest an answer

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

Atlassian Community Events