SSH Error: Kinsta + Trellis

Hi everyone, I am trying to connect my local trellis environment via ansible to my Live site magaged with Kinsta. When I tun the following command:

ansible-playbook deploy.yml -e env=production -e site=johnboylesingfield.net --limit=kinsta_production

This error shows up

---------------------------------------------------
SSH Error: data could not be sent to remote host "kinsta_production". Make
sure this host can be reached over ssh
fatal: [kinsta_production]: UNREACHABLE! => {"changed": false, "unreachable": true}
	to retry, use: --limit @/Users/johnbsingfield/Documents/John/Sites/johnboylesingfield.net/trellis/deploy.retry

PLAY RECAP *********************************************************************
kinsta_production          : ok=2    changed=0    unreachable=1    failed=0

I cleared my Known_hosts file and tried many things from many posts here and from tutorials on SSH found on roots.io and Github but with no success. Thanks for your help.

Can you connect to your site with SSH outside of running ansible?

Yes I can.

I use :

ssh johnboylesingfield@35.203.98.50 -p 15012

and It works perfectly.

However, The ansible command show me that error no matter what I do.

I also tried to generate a brand new key from scratch and do all the steps to set it up on kinsta but it is still not working. I also did ssh-add -k with no results as well.

Nevermind. I found my mistake. I needed to add an ansible call line:

kinsta_production ansible_host=104.154.94.123 ansible_ssh_port=12345 ansible_ssh_extra_args='-o StrictHostKeyChecking=no'

In my host file Trellis install.

Thanks.

This topic was automatically closed after 42 days. New replies are no longer allowed.