# Display more info when SSH errors occur

**URL:** <https://forum.ansible.com/t/display-more-info-when-ssh-errors-occur/16869>\
**Category:** Ansible Project\
**Created:** [November 25, 2014, 12:57am UTC](https://forum.ansible.com/t/display-more-info-when-ssh-errors-occur/16869 "2014-11-25T00:57:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Abramowitz](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Marc\_Abramowitz](https://forum.ansible.com/u/Marc_Abramowitz)\
**Post date:** [November 25, 2014, 12:57am UTC](https://forum.ansible.com/t/display-more-info-when-ssh-errors-occur/16869/1 "2014-11-25T00:57:24Z")

</div>

I finally got tired of seeing this message:

```auto
fatal: [vagrant] => SSH encountered an unknown error during the connection.
We recommend you re-run the command using -vvvv, which will enable SSH debugging 
output to help diagnose the issue

```

so I went ahead and created a PR to make the error messages more helpful:

[https://github.com/ansible/ansible/pull/9605](https://github.com/ansible/ansible/pull/9605)

Instead of the above error message, you get some more helpful error messages:

```auto
fatal: [vagrant] => SSH Error: Host key verification failed.
    while connecting to 127.0.0.1:2222
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help
 diagnose the issue.

```

```auto
fatal: [vagrant] => SSH Error: ssh: connect to host 74.125.239.52 port 22: Operation timed out
    while connecting to 74.125.239.52:22
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help 
diagnose the issue.

```

```auto
fatal: [vagrant] => SSH Error: ssh: connect to host 192.26.5.1 port 22: Network is unreachable
    while connecting to 192.26.5.1:22
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help
diagnose the issue.

```

```auto
fatal: [vagrant] => SSH Error: Permission denied (publickey,password).
    while connecting to 69.163.167.30:22
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help 
diagnose the issue.

```

```auto
fatal: [vagrant] => SSH Error: ssh_exchange_identification: Connection closed by remote host
    while connecting to 74.125.239.52:80
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help 
diagnose the issue.

```

```auto
fatal: [vagrant] => SSH Error: bad permissions: ignore key: 
/Users/marca/.vagrant.d/insecure_private_key
    while connecting to 127.0.0.1:2222
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help 
diagnose the issue.

```

Let me know if you try it and if you have success or if you have problems. I’ll try to update the PR if it needs it.

Marc
