While ssh to server getting the error,
it is successfully connecting with same IP from the local
Hi and welcome to the community!
We need some additional details to better help you:
Kind regards,
Theodora
Hi Theodora,
please find the additional details
1. The self-hosted runner is Linux Docker
2. I have generated the in our server ( which is our deployment server)
3. we did not mention any private key as we have updated the ssh key in our repository.
4. command in the pipeline used
"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thank you for the info.
You said:
we did not mention any private key as we have updated the ssh key in our repository.
Can you please confirm if you have added the private and public SSH key you generated in the Repository settings of the repo > section Pipelines - SSH keys?
If so, when you run a Pipelines build with a Linux Docker runner the private SSH key will be located at
/tmp/runner-uuid/ssh/id_rsa
in the build container, where runner-uuid is the UUID of the runner. You can find the runner UUID in the preconfigured command you used to start the runner. In this command, you will see a variable like the following:
-e RUNNER_UUID={b609961f-891e-c872-c36b-f3f2c315d186}
This means that the SSH key is located at
/tmp/b609961f-891e-c872-c36b-f3f2c315d186/ssh/id_rsa
You can then adjust the SSH command in your bitbucket-pipelines.yml file and add the -i option, which allows you to specify which SSH key you want the command to use:
- ssh -i /tmp/runner-uuid/ssh/id_rsa -o BatchMode=yes -o StrictHostKeyChecking=no deploy@<public ip> 'echo "helloworld "
Replace runner-uuid in the command with the UUID of your runner.
Please also ensure that the public SSH key is added to the ~/.ssh/authorized_keys of the server you want to connect to.
Please feel free to let me know how it goes and if you have any questions.
Kind regards,
Theodora
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.
That's good to hear, thank you for the update!
Please feel free to reach out if you ever need anything else!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here i am accessing the server in the bit bucket pipeline and that runner is self hosted
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.