Hi everyone,
I have a SSH Key setup in my repository for which the deploy on the remote server works fine.
Now I'm trying to set a new SSH key to deploy the changes on a new server. I followed the instructions in the documentation below but I can't get it work. Pipeline fails with "Permission denied (public key)" error.
https://support.atlassian.com/bitbucket-cloud/docs/use-multiple-ssh-keys-in-your-pipeline/
The private key has been correctly encoded and added as a secure variable, no doubt about this.
The public key is installed on the remote host on ~/.ssh/authorized_keys
I'm not sure about the "my_known_hosts" file. I've generated this file on the local machine by specifying the correct host and I committed to my repository. The public key in "my_known_hosts" file is different than one from "~/.ssh/authorized_keys".
In the remote server I don't have any "know_hosts" file and I'm not sure if I should have.
Any help would be greatly appreciated