Failed to connect to the host via ssh: OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 command-line line 0: Bad protocol 2 host key algorithms 'ssh- ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh- rsa'

I had a similar issue, it was caused by explicitly set HostKey algorithms in ansible (SSH client) config.
See https://github.com/roots/trellis/issues/784
and https://github.com/ansible/ansible/issues/22289 .

You could try to comment out the explicit HostKey algorithms list for the initial provisioning.
After a successful Trellis provisioning the SSH server/config is in a well-known working state.

2 Likes