# ERROR: Retrieve local SSH client's settings per host

**URL:** https://discourse.roots.io/t/error-retrieve-local-ssh-clients-settings-per-host/8801
**Category:** trellis
**Created:** 2017-02-13T11:47:17Z
**Posts:** 4

## Post 1 by @chrisk2020 — 2017-02-13T11:47:17Z

I’ve got a new trellis instance and I’m running into a problem after initial setup and vagrant up:

## `TASK [common : Retrieve local SSH client’s settings per host] ****************** ssh: illegal option – G usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command] System info: Ansible 2.2.0.0; Vagrant 1.8.5; Darwin Trellis at “Require Ansible 2.2.0.0 or greater”`

lookup\_plugin.pipe(ssh -ttG 127.0.0.1 | grep hostkeyalgorithms) returned 1  
fatal: [default]: FAILED! =\> {“failed”: true}

I’m running ansible 2.2.00

I suspect this has something to do with:

> <https://github.com/roots/trellis/commit/ec5c76832ef53389572f808116f93f3e8d110c09>

Can anyone give me some pointers to debug this?

Thanks in advance.

---

## Post 2 by @fullyint — 2017-02-13T18:18:10Z

Thanks for reporting this.

You could disable the [ssh client validation](https://github.com/roots/trellis/blob/5dd75bc0b71473ee71d636e78df567ffe39133ea/roles/common/tasks/main.yml#L53) to temporarily avoid the problem:

```
# group_vars/all/main.yml
validate_ssh: false
```

* * *

I installed Ansible 2.2.0.0 and Vagrant 1.8.5 and was unable to reproduce this on my macOS 10.11.6.

**OS version.** What version is your OS?

**OpenSSH version.** Could you share your SSH client version?  
Run `ssh -V` on your mac. Here’s mine:

```
$ ssh -V

OpenSSH_6.9p1, LibreSSL 2.1.8
```

Looks like the `-G` option was added in [version 6.8](http://www.openssh.com/releasenotes.html) (released Mar 18, 2015):

> - ssh(1): Add a -G option to ssh that causes it to parse its  
> configuration and dump the result to stdout, similar to “sshd -T”.

**SSH -G.** Could you test the `-G` option generally on your mac by running this?

```
$ ssh -G example.com

hostname example.com
port 22
addressfamily any
batchmode no
canonicalizefallbacklocal yes
...
+ 65 more lines of settings
```

No need to print all the settings it should output, unless it shows an error that looks helpful.

Also try `ssh -ttG example.com` to see if the forced tty allocation (`-tt`) yields an error.

---

## Post 3 by @chrisk2020 — 2017-02-15T10:38:27Z

Hi - Apologies for the delay in reply:

My os is 10.10.5

\<code\>ssh -V  
OpenSSH\_6.2p2, OSSLShim 0.9.8r 8 Dec 2011

ssh -G and -ttG give the error from the original posts.

I’ll try updating system openSSH?

---

## Post 4 by @chrisk2020 — 2017-02-15T12:26:36Z

I went ahead and updated the OS on the machine to 10.12.3 and that has resolved the issues.
