# Ansible-connection to host

**URL:** <https://forum.ansible.com/t/ansible-connection-to-host/37895>\
**Category:** Ansible Developer\
**Tags:** ubuntu\
**Created:** [April 17, 2023, 8:17pm UTC](https://forum.ansible.com/t/ansible-connection-to-host/37895 "2023-04-17T20:17:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tjkent88](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tjkent88/32/4521_2.png) [@Tjkent88](https://forum.ansible.com/u/Tjkent88)\
**Post date:** [April 17, 2023, 8:17pm UTC](https://forum.ansible.com/t/ansible-connection-to-host/37895/1 "2023-04-17T20:17:02Z")

</div>

Hello everyone,

Let me know if this is the wrong space for this, but I am having an issue where ansible times out when connecting to only one server. I am able to connect to the server through ssh, and I am able to ping with netcat. However when I am trying to use ansible, it just sits there. It doesn’t time out, it just seems like it is attempting to connect but gets nothing.

command being used:  
ansible -m ping ops\_ssh\_jump\_gate -i inventory/hosts -vvvv

output:  
❯ ansible -m ping ops\_ssh\_jump\_gate -i inventory/hosts -vvvv  
/usr/local/lib/python3.6/dist-packages/ansible/parsing/vault/ **init**.py:44: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography (40.0) will be the last to support Python 3.6.  
from cryptography.exceptions import InvalidSignature  
ansible 2.9.27  
config file = /home/ted\_kent/repos/DevOps/ansible.cfg  
configured module search path = [‘/home/ted\_kent/repos/DevOps/library’]  
ansible python module location = /usr/local/lib/python3.6/dist-packages/ansible  
executable location = /usr/local/bin/ansible  
python version = 3.6.9 (default, Mar 10 2023, 16:46:00) [GCC 8.4.0]  
Using /home/ted\_kent/repos/DevOps/ansible.cfg as config file  
setting up inventory plugins  
host\_list declined parsing /home/ted\_kent/repos/DevOps/inventory/hosts as it did not pass its verify\_file() method  
script declined parsing /home/ted\_kent/repos/DevOps/inventory/hosts as it did not pass its verify\_file() method  
auto declined parsing /home/ted\_kent/repos/DevOps/inventory/hosts as it did not pass its verify\_file() method

Parsed /home/ted\_kent/repos/DevOps/inventory/hosts inventory source with ini plugin  
Loading callback plugin minimal of type stdout, v2.0 from /usr/local/lib/python3.6/dist-packages/ansible/plugins/callback/minimal.py  
Skipping callback ‘actionable’, as we already have a stdout callback.  
Skipping callback ‘counter\_enabled’, as we already have a stdout callback.  
Skipping callback ‘debug’, as we already have a stdout callback.  
Skipping callback ‘dense’, as we already have a stdout callback.  
Skipping callback ‘dense’, as we already have a stdout callback.  
Skipping callback ‘full\_skip’, as we already have a stdout callback.  
Skipping callback ‘json’, as we already have a stdout callback.  
Skipping callback ‘minimal’, as we already have a stdout callback.  
Skipping callback ‘null’, as we already have a stdout callback.  
Skipping callback ‘oneline’, as we already have a stdout callback.  
Skipping callback ‘selective’, as we already have a stdout callback.  
Skipping callback ‘skippy’, as we already have a stdout callback.  
Skipping callback ‘stderr’, as we already have a stdout callback.  
Skipping callback ‘unixy’, as we already have a stdout callback.  
Skipping callback ‘yaml’, as we already have a stdout callback.  
META: ran handlers  
\<ops\_ssh\_jump\_gate\> Attempting python interpreter discovery  
\<10.250.0.57\> ESTABLISH SSH CONNECTION FOR USER: ubuntu  
\<10.250.0.57\> SSH: EXEC ssh -vvv -o ForwardAgent=yes -o ControlPersist=1800s -o ControlMaster=auto -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ‘User=“ubuntu”’ -o ConnectTimeout=120 -o ControlPath=/home/ted\_kent/.ansible/cp/4f8442b778 10.250.0.57 ‘/bin/sh -c ‘"’“'echo PLATFORM; uname; echo FOUND; command -v '”’“'”‘"’“'”‘"’“‘/usr/bin/python’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘python3.7’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘python3.6’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘python3.5’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘python2.7’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘python2.6’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘/usr/libexec/platform-python’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘/usr/bin/python3’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘python’”‘"’“'”‘"’“'”‘"’; echo ENDFOUND && sleep 0’“'”‘’

At this point, it just hangs. I can’t find anything on the host server about connecting, and I don’t see anything on the target as far as a connection.

Additionally, there was one user that was able to access this server though ansible, but I have restarted the server and that is no longer possible.

Happy to answer any questions.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Tjkent88](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tjkent88/32/4521_2.png) [@Tjkent88](https://forum.ansible.com/u/Tjkent88)\
**Post date:** [April 17, 2023, 8:29pm UTC](https://forum.ansible.com/t/ansible-connection-to-host/37895/2 "2023-04-17T20:29:49Z")

</div>

Sorry for the email, this is not for this space.
