Roots Discourse

SSH unreachable error, still not solved

Original SSH forum post

I wanted to put this into the above post but it has been closed and I can’t re-open it.

the errors are not resolved

System info:
Ansible 2.1.1.0; Linux
Trellis at “Fix #639 - WP 4.6 compatibility: update WP-CLI to 0.24.1”

Failed to connect to the host via ssh.
fatal: [lc-dev1.co.uk]: UNREACHABLE! => {“changed”: false, “unreachable”: true}
[WARNING]: Could not create retry file ‘deploy.retry’. [Errno 2] No such file or directory: ‘’

PLAY RECAP *********************************************************************
lc-dev1.co.uk : ok=0 changed=0 unreachable=1 failed=0
localhost : ok=0 changed=0 unreachable=0 failed=0

ssh as root works perfectly

ansible staging -m raw -a whoami -u root

this returns

lc-dev1.co.uk | SUCCESS | rc=0 >>
root

ansible.cfg looks like this

[ssh_connection]
control_path = %(directory)s/%%h-%%r
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s

as suggested here :

my hosts / staging file looks like this

> # hosts/staging
> lc-dev1.co.uk ansible_host=178.62.35.88 ansible_ssh_private_key_file='~/.ssh/digital_ocean'

> [staging]
> lc-dev1.co.uk

> [web]
> lc-dev1.co.uk

as suggested here

I have played around with the path ~/.ssh/digital_ocean and /home/sbeasley/digital ocean, neither fix the problem

I have been rebuilding my ubuntu 16.04 DO droplet after every change I make

/home/sbeasley/.ssh/config - does not exist

/etc/ssh/ssh_config - looks like this

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no

I temporarily got it working but not on multiple computers, now its not working on either of my computers and I have no idea what to try next

I am using these versions

ansible 2.1.1.0
Vagrant 1.8.5
Virtualbox 5.1.4

Looks like you’ve already had a whole lot of help already :sweat: Scheduling a call at https://roots.io/services/ might be more beneficial for helping you getting up and running.

Hi

I found the following SO thread and forum post helped. I had all sorts of issues with SSH keys after the macOS Sierra upgrade.

Quick answer is running the following magically fixed everything. Chilled my beer, brewed my coffee, cut my hair and made me dinner. It was some next level magic.

ssh-add -A

For more detail, explanation etc then have a read of the following.

And the two tests in here were helpful