Hi everyone.
I had a weird behaviour on one of our self-hosted pipelines.
I want to deploy and artifact with SCP or Rsync but always get "Host key verification failed" ( both fails ).
Oddest thing is that ssh works like a charm with same config.
I'm pretty sure that it has to be a known_hosts file thing, but I can't figure why.
@Andrés Soria
Hi. Thanks for your question. We will investigate your issue and notify you.
Regards, Igor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Andrés Soria .
We still investigating this issue and unfortunately no useful updates for today.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Andrés Soria Hi. Currently working on your issue. First what i found is that know_hosts is under
/opt/atlassian/pipelines/agent/ssh/known_hosts
and since that you don't have this file in your infrastructure (because you didn't update the known hosts from the UI) you have the error:
"No SSH known_hosts configured in Pipelines."
Maybe try to update your know hosts manually but with the correct dir path:
ssh-keyscan -H $SERVER_IP >> /opt/atlassian/pipelines/agent/ssh/known_hosts
or generate the output of `ssh-keyscan -H <your private host>` from where it works and pass the result to `/opt/atlassian/pipelines/agent/ssh/known_hosts`
Waiting for your feedback. Regards Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also i found that self hosted runner does not work with default ssh_key. You should use your custom ssh key. See how to generate encoded ssh_key under the section
Use multiple SSH keys in your pipeline of https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/
pass the output in the bitbucket repository variables with name i.e SSH_KEY
and use it in your pipe:
script:
- pipe: atlassian/rsync-deploy:0.7.0
variables:
USER: <your user>
SERVER: <your host>
REMOTE_PATH: '/var/www/build/'
LOCAL_PATH: 'build'
SSH_KEY: $SSH_KEY
DEBUG: 'true'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, I have work to do.
Let me try this solutions. I'll get back to you as soon as possible.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've been trying to update /opt/atlassian/pipelines/agent/ssh/known_hosts on different ways but always end with same result : Host key verification failed.
As you can see in the picture, i'm able to update known_hosts file but bitbucket seems to not use it.
So, i figured it out by adding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.