# Ansible ssh connection issue

**URL:** <https://forum.ansible.com/t/ansible-ssh-connection-issue/30748>\
**Category:** Ansible Project\
**Created:** [July 10, 2019, 8:21pm UTC](https://forum.ansible.com/t/ansible-ssh-connection-issue/30748 "2019-07-10T20:21:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_Griffiths](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@Jim\_Griffiths](https://forum.ansible.com/u/Jim_Griffiths)\
**Post date:** [July 10, 2019, 8:21pm UTC](https://forum.ansible.com/t/ansible-ssh-connection-issue/30748/1 "2019-07-10T20:21:44Z")

</div>

Hi All

Ansible is not able to connect to certain servers in my environment.

Setting up ssh keys is not really an option because I do not have write access. Even if I did, there are 1300 servers. 🙂

Please let me know what the issue is and what I can do to resolve.

Thank you in advance!

-Jim

$ **ansible test -m ping -i inventories/try1 --ask-pass -vvvv**

ansible 2.8.1

config file = /etc/ansible/ansible.cfg

configured module search path = [u’/home/tjx/jam01370/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]

ansible python module location = /usr/lib/python2.7/site-packages/ansible

executable location = /usr/bin/ansible

python version = 2.7.5 (default, Mar 26 2019, 22:13:06) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

Using /etc/ansible/ansible.cfg as config file

SSH password:

setting up inventory plugins

host\_list declined parsing /home/tjx/jam01370/splunk\_uf\_install/inventories/try1 as it did not pass it’s verify\_file() method

script declined parsing /home/tjx/jam01370/splunk\_uf\_install/inventories/try1 as it did not pass it’s verify\_file() method

auto declined parsing /home/tjx/jam01370/splunk\_uf\_install/inventories/try1 as it did not pass it’s verify\_file() method

Parsed /home/tjx/jam01370/splunk\_uf\_install/inventories/try1 inventory source with ini plugin

Loading callback plugin minimal of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/minimal.pyc

META: ran handlers

Attempting python interpreter discovery

ESTABLISH SSH CONNECTION FOR USER: None

SSH: EXEC sshpass -d10 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ConnectTimeout=30 -o ControlPath=/home/tjx/jam01370/.ansible/cp/b52d05cd40 lnxqaplm10 ‘/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’“'”‘’

(0, ‘PLATFORM\nLinux\nFOUND\n/usr/bin/python\n/usr/bin/python\nENDFOUND\n’, ‘OpenSSH\_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh\_config\r\ndebug1: /etc/ssh/ssh\_config line 58: Applying options for _\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket “/home/tjx/jam01370/.ansible/cp/b52d05cd40” does not exist\r\ndebug2: resolving “lnxqaplm10” port 22\r\ndebug2: ssh\_connect\_direct: needpriv 0\r\ndebug1: Connecting to lnxqaplm10 [172.16.130.114] port 22.\r\ndebug2: fd 3 setting O\_NONBLOCK\r\ndebug1: fd 3 clearing O\_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 30000 ms remain after connect\r\ndebug1: identity file /home/tjx/jam01370/.ssh/id\_rsa type 1\r\ndebug1: key\_load\_public: No such file or directory\r\ndebug1: identity file /home/tjx/jam01370/.ssh/id\_rsa-cert type -1\r\ndebug1: key\_load\_public: No such file or directory\r\ndebug1: identity file /home/tjx/jam01370/.ssh/id\_dsa type -1\r\ndebug1: key\_load\_public: No such file or directory\r\ndebug1: identity file /home/tjx/jam01370/.ssh/id\_dsa-cert type -1\r\ndebug1: key\_load\_public: No such file or directory\r\ndebug1: identity file /home/tjx/jam01370/.ssh/id\_ecdsa type -1\r\ndebug1: key\_load\_public: No such file or directory\r\ndebug1: identity file /home/tjx/jam01370/.ssh/id\_ecdsa-cert type -1\r\ndebug1: key\_load\_public: No such file or directory\r\ndebug1: identity file /home/tjx/jam01370/.ssh/id\_ed25519 type -1\r\ndebug1: key\_load\_public: No such file or directory\r\ndebug1: identity file /home/tjx/jam01370/.ssh/id\_ed25519-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH\_7.4\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH\_4.3\r\ndebug1: match: OpenSSH\_4.3 pat OpenSSH\_4_ compat 0x00000000\r\ndebug2: fd 3 setting O\_NONBLOCK\r\ndebug1: Authenticating to lnxqaplm10:22 as 'jam01370'\r\ndebug3: hostkeys\_foreach: reading file “/home/tjx/jam01370/.ssh/known\_hosts”\r\ndebug3: record\_hostkey: found key type DSA in file /home/tjx/jam01370/.ssh/known\_hosts:62\r\ndebug3: load\_hostkeys: loaded 1 keys from lnxqaplm10\r\ndebug3: order\_hostkeyalgs: prefer hostkeyalgs: [ssh-dss-cert-v01@openssh.com](mailto:ssh-dss-cert-v01@openssh.com),ssh-dss\r\ndebug3: send packet: type 20\r\ndebug1: SSH2\_MSG\_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2\_MSG\_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: [curve25519-sha256,curve25519-sha256@libssh.org](mailto:curve25519-sha256,curve25519-sha256@libssh.org),ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,ext-info-c\r\ndebug2: host key algorithms: [ssh-dss-cert-v01@openssh.com](mailto:ssh-dss-cert-v01@openssh.com),ssh-dss,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa\r\ndebug2: ciphers ctos: [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com),aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: ciphers stoc: [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com),aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: MACs ctos: [umac-64-etm@openssh.com](mailto:umac-64-etm@openssh.com),umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: [umac-64-etm@openssh.com](mailto:umac-64-etm@openssh.com),umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: [zlib@openssh.com](mailto:zlib@openssh.com),zlib,none\r\ndebug2: compression stoc: [zlib@openssh.com](mailto:zlib@openssh.com),zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first\_kex\_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\ndebug2: host key algorithms: ssh-dss\r\ndebug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: MACs ctos: [hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com](mailto:hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com),hmac-sha1-96,hmac-md5-96\r\ndebug2: MACs stoc: [hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com](mailto:hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com),hmac-sha1-96,hmac-md5-96\r\ndebug2: compression ctos: [none,zlib@openssh.com](mailto:none,zlib@openssh.com)\r\ndebug2: compression stoc: [none,zlib@openssh.com](mailto:none,zlib@openssh.com)\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first\_kex\_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: diffie-hellman-group-exchange-sha1\r\ndebug1: kex: host key algorithm: ssh-dss\r\ndebug1: kex: server-\>client cipher: aes128-ctr MAC: hmac-sha1 compression: [zlib@openssh.com](mailto:zlib@openssh.com)\r\ndebug1: kex: client-\>server cipher: aes128-ctr MAC: hmac-sha1 compression: [zlib@openssh.com](mailto:zlib@openssh.com)\r\ndebug1: kex: diffie-hellman-group-exchange-sha1 need=20 dh\_need=20\r\ndebug1: kex: diffie-hellman-group-exchange-sha1 need=20 dh\_need=20\r\ndebug3: send packet: type 34\r\ndebug1: SSH2\_MSG\_KEX\_DH\_GEX\_REQUEST(1024\<7680\<8192) sent\r\ndebug3: receive packet: type 31\r\ndebug1: got SSH2\_MSG\_KEX\_DH\_GEX\_GROUP\r\ndebug2: bits set: 3096/6144\r\ndebug3: send packet: type 32\r\ndebug1: SSH2\_MSG\_KEX\_DH\_GEX\_INIT sent\r\ndebug3: receive packet: type 33\r\ndebug1: got SSH2\_MSG\_KEX\_DH\_GEX\_REPLY\r\ndebug1: Server host key: ssh-dss SHA256:FRUbt1RkaSS/uqBrwCbUb9I43nyah+iKP+DZzqKWMd0\r\ndebug3: hostkeys\_foreach: reading file “/home/tjx/jam01370/.ssh/known\_hosts”\r\ndebug3: record\_hostkey: found key type DSA in file /home/tjx/jam01370/.ssh/known\_hosts:62\r\ndebug3: load\_hostkeys: loaded 1 keys from lnxqaplm10\r\ndebug3: hostkeys\_foreach: reading file “/home/tjx/jam01370/.ssh/known\_hosts”\r\ndebug3: record\_hostkey: found key type DSA in file /home/tjx/jam01370/.ssh/known\_hosts:62\r\ndebug3: load\_hostkeys: loaded 1 keys from 172.16.130.114\r\ndebug1: Host 'lnxqaplm10' is known and matches the DSA host key.\r\ndebug1: Found key in /home/tjx/jam01370/.ssh/known\_hosts:62\r\ndebug2: bits set: 3101/6144\r\ndebug3: send packet: type 21\r\ndebug2: set\_newkeys: mode 1\r\ndebug1: rekey after 4294967296 blocks\r\ndebug1: SSH2\_MSG\_NEWKEYS sent\r\ndebug1: expecting SSH2\_MSG\_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2\_MSG\_NEWKEYS received\r\ndebug2: set\_newkeys: mode 0\r\ndebug1: rekey after 4294967296 blocks\r\ndebug2: key: /home/tjx/jam01370/.ssh/id\_rsa (0x55fd4560ec20)\r\ndebug2: key: /home/tjx/jam01370/.ssh/id\_dsa ((nil))\r\ndebug2: key: /home/tjx/jam01370/.ssh/id\_ecdsa ((nil))\r\ndebug2: key: /home/tjx/jam01370/.ssh/id\_ed25519 ((nil))\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 6\r\ndebug2: service\_accept: ssh-userauth\r\ndebug1: SSH2\_MSG\_SERVICE\_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 53\r\ndebug3: input\_userauth\_banner\r\n\n\tThis is a XXX Companies computer system. \n\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,gssapi-with-mic,password\r\ndebug3: start over, passed a different list publickey,gssapi-with-mic,password\r\ndebug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password\r\ndebug3: authmethod\_lookup gssapi-with-mic\r\ndebug3: remaining preferred: publickey,keyboard-interactive,password\r\ndebug3: authmethod\_is\_enabled gssapi-with-mic\r\ndebug1: Next authentication method: gssapi-with-mic\r\ndebug3: send packet: type 50\r\ndebug2: we sent a gssapi-with-mic packet, wait for reply\r\ndebug3: receive packet: type 60\r\ndebug3: send packet: type 61\r\ndebug3: receive packet: type 61\r\ndebug3: send packet: type 66\r\ndebug3: receive packet: type 52\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (gssapi-with-mic).\r\nAuthenticated to lnxqaplm10 ([172.16.130.114]:22).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver\_listen: temporary control path /home/tjx/jam01370/.ansible/cp/b52d05cd40.DRIzA5JLhdR5C7r2\r\ndebug2: fd 4 setting O\_NONBLOCK\r\ndebug3: fd 4 is O\_NONBLOCK\r\ndebug3: fd 4 is O\_NONBLOCK\r\ndebug1: channel 0: new [/home/tjx/jam01370/.ansible/cp/b52d05cd40]\r\ndebug3: muxserver\_listen: mux listener channel 0 fd 4\r\ndebug2: fd 3 setting TCP\_NODELAY\r\ndebug3: ssh\_packet\_set\_tos: set IP\_TOS 0x08\r\ndebug1: control\_persist\_detach: backgrounding master process\r\ndebug2: control\_persist\_detach: background process is 16107\r\ndebug2: fd 4 setting O\_NONBLOCK\r\ndebug1: forking to background\r\ndebug1: Entering interactive session.\r\ndebug1: pledge: id\r\ndebug2: set\_control\_persist\_exit\_time: schedule exit in 60 seconds\r\ndebug1: multiplexing control connection\r\ndebug2: fd 5 setting O\_NONBLOCK\r\ndebug3: fd 5 is O\_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel\_post\_mux\_listener: new mux channel 1 fd 5\r\ndebug3: mux\_master\_read\_cb: channel 1: hello sent\r\ndebug2: set\_control\_persist\_exit\_time: cancel scheduled exit\r\ndebug3: mux\_master\_read\_cb: channel 1 packet type 0x00000001 len 4\r\ndebug2: process\_mux\_master\_hello: channel 1 slave version 4\r\ndebug2: mux\_client\_hello\_exchange: master version 4\r\ndebug3: mux\_client\_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux\_client\_request\_session: entering\r\ndebug3: mux\_client\_request\_alive: entering\r\ndebug3: mux\_master\_read\_cb: channel 1 packet type 0x10000004 len 4\r\ndebug2: process\_mux\_alive\_check: channel 1: alive check\r\ndebug3: mux\_client\_request\_alive: done pid = 16109\r\ndebug3: mux\_client\_request\_session: session request sent\r\ndebug3: mux\_master\_read\_cb: channel 1 packet type 0x10000002 len 449\r\ndebug2: process\_mux\_new\_session: channel 1: request tty 0, X 0, agent 0, subsys 0, term “xterm”, cmd “/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'”, env 1\r\ndebug3: process\_mux\_new\_session: got fds stdin 6, stdout 7, stderr 8\r\ndebug2: fd 7 setting O\_NONBLOCK\r\ndebug2: fd 8 setting O\_NONBLOCK\r\ndebug1: channel 2: new [client-session]\r\ndebug2: process\_mux\_new\_session: channel\_new: 2 linked to control channel 1\r\ndebug2: channel 2: send open\r\ndebug3: send packet: type 90\r\ndebug3: receive packet: type 91\r\ndebug2: callback start\r\ndebug2: client\_session2\_setup: id 2\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG = en\_US.UTF-8\r\ndebug2: channel 2: request env confirm 0\r\ndebug3: send packet: type 98\r\ndebug1: Sending command: /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'\r\ndebug2: channel 2: request exec confirm 1\r\ndebug3: send packet: type 98\r\ndebug3: mux\_session\_confirm: sending success reply\r\ndebug2: callback done\r\ndebug2: channel 2: open confirm rwindow 0 rmax 32768\r\ndebug1: mux\_client\_request\_session: master session id: 2\r\ndebug2: channel 2: rcvd adjust 2097152\r\ndebug3: receive packet: type 99\r\ndebug2: channel\_input\_status\_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\r\ndebug3: receive packet: type 96\r\ndebug2: channel 2: rcvd eof\r\ndebug2: channel 2: output open → drain\r\ndebug3: receive packet: type 98\r\ndebug1: client\_input\_channel\_req: channel 2 rtype exit-status reply 0\r\ndebug3: mux\_exit\_message: channel 2: exit message, exitval 0\r\ndebug3: receive packet: type 97\r\ndebug2: channel 2: rcvd close\r\ndebug2: channel 2: close\_read\r\ndebug2: channel 2: input open → closed\r\ndebug3: channel 2: will not send data after close\r\ndebug3: channel 2: will not send data after close\r\ndebug2: channel 2: obuf empty\r\ndebug2: channel 2: close\_write\r\ndebug2: channel 2: output drain → closed\r\ndebug2: channel 2: send close\r\ndebug3: send packet: type 97\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: gc: notify user\r\ndebug3: mux\_master\_session\_cleanup\_cb: entering for channel 2\r\ndebug2: channel 1: rcvd close\r\ndebug2: channel 1: output open → drain\r\ndebug2: channel 1: close\_read\r\ndebug2: channel 1: input open → closed\r\ndebug2: channel 2: gc: user detached\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: garbage collecting\r\ndebug1: channel 2: free: client-session, nchannels 3\r\ndebug3: channel 2: status: The following connections are open:\r\n #1 mux-control (t16 r-1 i3/0 o1/0 fd 5/5 cc -1)\r\n #2 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)\r\n\r\ndebug2: channel 1: obuf empty\r\ndebug2: channel 1: close\_write\r\ndebug2: channel 1: output drain → closed\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: gc: notify user\r\ndebug3: mux\_master\_control\_cleanup\_cb: entering for channel 1\r\ndebug2: channel 1: gc: user detached\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: garbage collecting\r\ndebug1: channel 1: free: mux-control, nchannels 2\r\ndebug3: channel 1: status: The following connections are open:\r\n #1 mux-control (t16 r-1 i3/0 o3/0 fd 5/5 cc -1)\r\n\r\ndebug3: mux\_client\_read\_packet: read header failed: Broken pipe\r\ndebug2: set\_control\_persist\_exit\_time: schedule exit in 60 seconds\r\ndebug2: Received exit status from master 0\r\n’)

ESTABLISH SSH CONNECTION FOR USER: None

SSH: EXEC sshpass -d10 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ConnectTimeout=30 -o ControlPath=/home/tjx/jam01370/.ansible/cp/b52d05cd40 lnxqaplm10 ‘/bin/sh -c ‘"’"’/usr/bin/python && sleep 0’“'”‘’

(1, ‘’, ‘OpenSSH\_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh\_config\r\ndebug1: /etc/ssh/ssh\_config line 58: Applying options for \*\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O\_NONBLOCK\r\ndebug2: mux\_client\_hello\_exchange: master version 4\r\ndebug3: mux\_client\_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux\_client\_request\_session: entering\r\ndebug3: mux\_client\_request\_alive: entering\r\ndebug3: mux\_client\_request\_alive: done pid = 16109\r\ndebug3: mux\_client\_request\_session: session request sent\r\ndebug1: mux\_client\_request\_session: master session id: 2\r\n File “”, line 19\n with io.open(path, 'r', encoding=encoding) as fd:\n ^\nSyntaxError: invalid syntax\ndebug3: mux\_client\_read\_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\n’)

Failed to connect to the host via ssh: OpenSSH\_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017

debug1: Reading configuration data /etc/ssh/ssh\_config

debug1: /etc/ssh/ssh\_config line 58: Applying options for \*

debug1: auto-mux: Trying existing master

debug2: fd 3 setting O\_NONBLOCK

debug2: mux\_client\_hello\_exchange: master version 4

debug3: mux\_client\_forwards: request forwardings: 0 local, 0 remote

debug3: mux\_client\_request\_session: entering

debug3: mux\_client\_request\_alive: entering

debug3: mux\_client\_request\_alive: done pid = 16109

debug3: mux\_client\_request\_session: session request sent

debug1: mux\_client\_request\_session: master session id: 2

File “”, line 19

with io.open(path, ‘r’, encoding=encoding) as fd:

^

SyntaxError: invalid syntax

debug3: mux\_client\_read\_packet: read header failed: Broken pipe

debug2: Received exit status from master 1

[WARNING]: Unhandled error in Python interpreter discovery for host lnxqaplm10: No JSON object could be decoded

Interpreter discovery remote stderr:

OpenSSH\_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017

debug1: Reading configuration data /etc/ssh/ssh\_config

debug1: /etc/ssh/ssh\_config line 58: Applying options for \*

debug1: auto-mux: Trying existing master

debug2: fd 3 setting O\_NONBLOCK

debug2: mux\_client\_hello\_exchange: master version 4

debug3: mux\_client\_forwards: request forwardings: 0 local, 0 remote

debug3: mux\_client\_request\_session: entering

debug3: mux\_client\_request\_alive: entering

debug3: mux\_client\_request\_alive: done pid = 16109

debug3: mux\_client\_request\_session: session request sent

debug1: mux\_client\_request\_session: master session id: 2

File “”, line 19

with io.open(path, ‘r’, encoding=encoding) as fd:

^

SyntaxError: invalid syntax

debug3: mux\_client\_read\_packet: read header failed: Broken pipe

debug2: Received exit status from master 1

Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/ping.py

Pipelining is enabled.

ESTABLISH SSH CONNECTION FOR USER: None

SSH: EXEC sshpass -d10 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ConnectTimeout=30 -o ControlPath=/home/tjx/jam01370/.ansible/cp/b52d05cd40 lnxqaplm10 ‘/bin/sh -c ‘"’"’/usr/bin/python && sleep 0’“'”‘’

(1, ‘’, ‘OpenSSH\_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh\_config\r\ndebug1: /etc/ssh/ssh\_config line 58: Applying options for \*\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O\_NONBLOCK\r\ndebug2: mux\_client\_hello\_exchange: master version 4\r\ndebug3: mux\_client\_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux\_client\_request\_session: entering\r\ndebug3: mux\_client\_request\_alive: entering\r\ndebug3: mux\_client\_request\_alive: done pid = 16109\r\ndebug3: mux\_client\_request\_session: session request sent\r\ndebug1: mux\_client\_request\_session: master session id: 2\r\n File “”, line 40\n with open(module, 'wb') as f:\n ^\nSyntaxError: invalid syntax\ndebug3: mux\_client\_read\_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\n’)

Failed to connect to the host via ssh: OpenSSH\_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017

debug1: Reading configuration data /etc/ssh/ssh\_config

debug1: /etc/ssh/ssh\_config line 58: Applying options for \*

debug1: auto-mux: Trying existing master

debug2: fd 3 setting O\_NONBLOCK

debug2: mux\_client\_hello\_exchange: master version 4

debug3: mux\_client\_forwards: request forwardings: 0 local, 0 remote

debug3: mux\_client\_request\_session: entering

debug3: mux\_client\_request\_alive: entering

debug3: mux\_client\_request\_alive: done pid = 16109

debug3: mux\_client\_request\_session: session request sent

debug1: mux\_client\_request\_session: master session id: 2

File “”, line 40

with open(module, ‘wb’) as f:

^

SyntaxError: invalid syntax

debug3: mux\_client\_read\_packet: read header failed: Broken pipe

debug2: Received exit status from master 1

[WARNING]: Platform linux on host lnxqaplm10 is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python

interpreter could change this. See [https://docs.ansible.com/ansible/2.8/reference\_appendices/interpreter\_discovery.html](https://docs.ansible.com/ansible/2.8/reference_appendices/interpreter_discovery.html) for more information.

lnxqaplm10 | FAILED! =\> {

“ansible\_facts”: {

“discovered\_interpreter\_python”: “/usr/bin/python”

},

“changed”: false,

“module\_stderr”: “OpenSSH\_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh\_config\r\ndebug1: /etc/ssh/ssh\_config line 58: Applying options for \*\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O\_NONBLOCK\r\ndebug2: mux\_client\_hello\_exchange: master version 4\r\ndebug3: mux\_client\_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux\_client\_request\_session: entering\r\ndebug3: mux\_client\_request\_alive: entering\r\ndebug3: mux\_client\_request\_alive: done pid = 16109\r\ndebug3: mux\_client\_request\_session: session request sent\r\ndebug1: mux\_client\_request\_session: master session id: 2\r\n File "", line 40\n with open(module, ‘wb’) as f:\n ^\nSyntaxError: invalid syntax\ndebug3: mux\_client\_read\_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\n”,

“module\_stdout”: “”,

“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,

“rc”: 1

}

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [July 10, 2019, 8:26pm UTC](https://forum.ansible.com/t/ansible-ssh-connection-issue/30748/2 "2019-07-10T20:26:37Z")

</div>

It looks like you have pipelining on, but python on the some of the servers cannot support it. The easiest thing to do is just disable pipelining.
