Provisioning issue with Trellis, Vagrant and Digital Ocean from Windows

Hi Guys, first post. Been trying to get the trellis > bedrock>sage stack to work using my windows 10 machine for the last few days. Im literally right at the end of the process, locally working fine, theme installed, bedrock features working…but I cannot deploy to staging.

As I understand it you must open a console at the trellis root folder (i use bitbash) and use vagrant to run commands for ansible to work on Windows:

To run the ansible-playbook commands to provision remote servers, you’ll need to SSH in to the VM, cd to the directory with your trellis files, then run the setup and deployment commands.

Am I doing this right?

example location to run provisioning ‘ansible-playbook server.yml -e env=staging’:
‘vagrant@site: ~/trellis’

and not:
‘user@windowsmachine: ~/trellis’

I also have cygwin set up for ssh but as I understand it bitbash is fine because I am using vagrant vm and I shouldnt need to use cygwin for provisioning or deployment.

This is the error I am getting:

jpols@MrComputer MINGW64 ~/Projects/recfishwa/trellis (master)
$ vagrant ssh
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-31-generic x86_64)

PLAY [Ensure necessary variables are defined] ************************************

TASK [Ensure environment is defined] *********************************************
skipping: [localhost]

PLAY [Test Connection and Determine Remote User] *********************************

TASK [connection : Require manual definition of remote-user] *********************
skipping: []

TASK [connection : Specify preferred HostKeyAlgorithms for unknown hosts] ********
skipping: []

TASK [connection : Check whether Ansible can connect as root] ********************
ok: [ -> localhost]

TASK [connection : Warn about change in host keys] *******************************
skipping: []

TASK [connection : Set remote user for each host] ********************************
ok: []

TASK [connection : Announce which user was selected] *****************************
Note: Ansible will attempt connections as user = admin
ok: []

TASK [connection : Load become password] *****************************************
ok: []

PLAY [Install prerequisites] *****************************************************

TASK [Install Python 2.x] ********************************************************
System info:
Ansible; Linux
Trellis at “Add Vagrant config”

Failed to connect to the host via ssh: Permission denied

fatal: []: UNREACHABLE! => {“changed”: false, “unreachable”: true}
to retry, use: --limit @/home/vagrant/trellis/server.retry

PLAY RECAP *********************************************************************** : ok=4 changed=0 unreachable=1 failed=0
localhost : ok=0 changed=0 unreachable=0 failed=0

I have been over the droplet setting and everything is configured correctly and since I have established I can login natively with ssh and just not with vagrant and I have reached a dead end, it seems like the droplet cannot find the key when connecting from vagrant?

vagrant@recfishwa:~/trellis$ ssh
Permission denied (publickey,password).

My question is this: I am doing this correctly with vagrant and why would I be able to connect with ssl on my native machine but not my vm? I am in the right place and is this what the docs mean by

Thanks, anyhelp appreciated I have been trying to resove this issue forover 12 hours and have probably been through all the posts and tutorials on the web!

Some Info on from the remote server:

  • grep ‘PermitRootLogin’ /etc/ssh/sshd_config: ‘yes’
  • grep ‘PasswordAuthentication’ /etc/ssh/sshd_config: ‘yes’ :
    PasswordAuthentification. Depending on your PAM config, PAM auth, then enable this but set PassWAuth.

Output of auth.log is (hand typed!):

vagrant@recfishwa:/$ ssh root@
Permission denied (publickey).
vagrant@recfishwa:/$ ssh -l root -p 22
Permission denied (publickey,password).

date staging-server sshd[2996]: Invalid user teamspeak from
’ ’ : input_userauth_request: invalid user teamspeak [preauth]
’ ’ : connection closed by
’ ‘: invalid user pi from
’ ’ : input_userauth_request: invalid user
’ ’ : error maximum authentication attempt exceeded for invalid user pi from port 37976 ssh2 [preauth]
’ ’ : disconnecting: too many authentication failures
’ ’ : Invalid user 123 from
’ ’ : input_userauth_request: invalid user 123 [preauth]
’ ’ : Connection reset by port 34744 [preauth]
’ ’ : Invalid user teamspeak from
’ ’ : input_userauth_request: invalid user teamspeak [preauth]
’ ’ : Connection closed by port 44127[preauth]


ssh-keygen -t rsa

Generating public/private rsa key pair.
Enter file in which to save the key (/home/vagrant/.ssh/id_rsa):
/home/vagrant/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/vagrant/.ssh/id_rsa.
Your public key has been saved in /home/vagrant/.ssh/
The key fingerprint is:
SHA256:rRYkvu8zw8yXMtjuW9+aDuPtZ766a7g0 vagrant@recfishwa
The key’s randomart image is:
±–[RSA 2048]----+
| |
| |
| . . |
| . o . |

vagrant@recfishwa:~$ ssh-copy-id root@

/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: “/home/vagrant/.ssh/”
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed – if you are prompted now it is to install the new keys
Permission denied (publickey,password).