Hi peeps,
After we went from gitlab to bitbucket I can't really figure out how I can connect to my remote server using SSH. I have added my ssh keys.
This is my bitbucket-pipeline.yml
image: atlassian/default-image:latest
pipelines:
default:
- step:
deployment: staging
script:
- ssh-add ~/.ssh/config
- ssh-add -l
- ls | ssh kkl@flx-xxx.nl -p 4000
- echo "Deploy step finished"
But it returns with+ ssh-add ~/.ssh/config
ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
Hello Daan,
The SSH keys are located in /opt/atlassian/pipelines/agent/ssh. This isn't the same location as the home directory (common for other systems). Pipelines should automatically set this up with the SSH client. So, you shouldn't need to use ssh-add before using SSH. But in case you need to do any configuration, the keys are located in /opt/atlassian/pipelines/agent/ssh.
Do you have any success by only running the ls and SSH command?
ls | ssh kkl@flx-xxx.nl -p 4000
Alternatively, you can try out our SSH Pipe. Which handles the client side SSH auth (you'll still need to have it set up properly on the server). Here's some general information on Pipes: https://confluence.atlassian.com/bitbucket/pipes-958765631.html
Thanks,
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.