Kinsta deploy - data could not be sent

I don’t know if the word here is that it’s cool to look for support on using trellis with Kinsta is cool here, but here goes. I know I’ve followed the instructions kindly provided by @ben at How to Use Bedrock and Trellis at the "(WordPress Development)" blog post. I’ve also looked to see if there were any additional threads of people on Trellis using Kinsta, no luck. I’ve done a lot of debugging, everything seems normal except for this issue. Earlier I was having a problem sshing into the server until I added -o PreferredAuthentications=password -o PubkeyAuthentication=no, so that might be relevant.

Anyways, here’s the error I’m getting on deploy:

TASK [Gathering Facts] ***********************************************************************************************************************************************************************
System info:
  Ansible 2.5.2; Darwin
  Trellis version (per changelog): "Enable `fastcgi_cache_background_update` by default"
SSH Error: data could not be sent to remote host "". Make sure
this host can be reached over ssh
fatal: [kinsta_staging]: UNREACHABLE! => {"changed": false, "unreachable": true}
        to retry, use: --limit @/Users/josephroberts/localdev/

PLAY RECAP ***********************************************************************************************************************************************************************************
kinsta_staging             : ok=1    changed=0    unreachable=1    failed=0

I’ve gone over the setting a few times, and I’m positive they’re all correct, and I’ve ensured I can indeed connect to the server via ssh.

Here’s the verbose output.

You’re good :slight_smile:

Can you share your trellis/hosts/staging file?

Here ya go:

# Add each host to the [staging] group and to a "type" group such as [web] or [db].
# List each machine only once per [group], even if it will host multiple sites.

kinsta_staging ansible_host= ansible_ssh_port=26254 ansible_ssh_pass="{{ vault_ansible_ssh_pass }}"



Just to confirm, you said that you can still ssh in normally. Have you tried again since the deploy attempt? If you happen to be locked out then it’s possible Kinsta banned your IP, which has happened to me a couple times when setting up Kinsta & Trellis sites. Support is quick to get that lifted.

Oh they whitelisted my IP recently, immediately after it still gives me an error. But yes I can ssh in, but only with -o PreferredAuthentications=password -o PubkeyAuthentication=no added, otherwise it just tries all my keys until the server gets tired of it and locks me out.

What’s your ~/.ssh/config file look like?

Here’s mine:

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa

Here’s it, I over-complicated it a bit when I didn’t understand ssh keys at all:

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa

# Kinsta
  IdentityFile ~/.ssh/id_rsa
  ForwardAgent yes

# GitHub : 'broskees' account
  User git
  IdentityFile ~/.ssh/id_rsa_github_broskees

# Digital Ocean Droplets
  IdentityFile ~/.ssh/id_rsa_digitalocean
  ForwardAgent yes

# WPEngine
  IdentityFile ~/.ssh/id_rsa_wpengine

# trellis vagrant ssh ssafd
Host syracusesedationandfamilydentistry.test 
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /Users/josephroberts/localdev/
  IdentitiesOnly yes
  LogLevel FATAL
  ForwardAgent yes

Try adding these options to ~/.ssh/config for your Kinsta host, that way you don’t need to pass them from the command line

Yes! This worked. thank you!