Step 6: Add an SSH key & known hosts
You have to add an SSH key and set the known hosts so the runner can connect to your server.
Visit your repository on the Bitbucket website and go to the "Repository Settings" and then "Pipelines - SSH Keys".
You can either add your own SSH key or have Bitbucket generate one for you.
Put the public key on your server in the ~/.ssh/authorized_keys
file.
After adding the public key to your server, on that same page in Bitbucket, add your host address to the known hosts section.
Use the same host address as the ssh_host
value in your yaml file.
If you don't set the correct known hosts, you'll get a Host key verification failed
error during your deployment.