# Ansible ssh error

**URL:** <https://forum.ansible.com/t/ansible-ssh-error/32560>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [March 30, 2020, 10:19am UTC](https://forum.ansible.com/t/ansible-ssh-error/32560 "2020-03-30T10:19:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bala\_Mutyam](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@Bala\_Mutyam](https://forum.ansible.com/u/Bala_Mutyam)\
**Post date:** [March 30, 2020, 10:19am UTC](https://forum.ansible.com/t/ansible-ssh-error/32560/1 "2020-03-30T10:19:11Z")

</div>

Hi Everyone,

I trying to run this from Ansible on Ubuntu server and client is Redhat 7 but giving me attached error, please help.

root@kotireddy4781c:/etc/ansible# ansible --version

ansible 2.5.1

config file = /etc/ansible/ansible.cfg

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

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

executable location = /usr/bin/ansible

python version = 2.7.17 (default, Nov 7 2019, 10:07:09) [GCC 7.4.0]

Debugging Error Messages,

\<172.31.122.1\> ESTABLISH SSH CONNECTION FOR USER: root

\<172.31.122.1\> SSH: ansible.cfg set ssh\_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)

\<172.31.122.1\> SSH: ansible\_password/ansible\_ssh\_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)

\<172.31.122.1\> SSH: ANSIBLE\_REMOTE\_USER/remote\_user/ansible\_user/user/-u set: (-o)(User=root)

\<172.31.122.1\> SSH: ANSIBLE\_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)

\<172.31.122.1\> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/root/.ansible/cp/7474ddd012)

\<172.31.122.1\> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/7474ddd012 172.31.122.1 ‘/bin/sh -c ‘"’“‘rm -f -r /root/.ansible/tmp/ansible-tmp-1585563249.11-149834904099980/ \> /dev/null 2\>&1 && sleep 0’”’"‘’

\<172.31.122.1\> (0, ‘’, ‘OpenSSH\_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh\_config\r\ndebug1: /etc/ssh/ssh\_config line 19: 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 = 7447\r\ndebug3: mux\_client\_request\_session: session request sent\r\ndebug1: mux\_client\_request\_session: master session id: 2\r\ndebug3: mux\_client\_read\_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n’)

fatal: [172.31.122.1]: FAILED! =\> {

“changed”: false,

“module\_stderr”: “OpenSSH\_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh\_config\r\ndebug1: /etc/ssh/ssh\_config line 19: 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 = 7447\r\ndebug3: mux\_client\_request\_session: session request sent\r\ndebug1: mux\_client\_request\_session: master session id: 2\r\ndebug3: mux\_client\_read\_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\nShared connection to 172.31.122.1 closed.\r\n”,

“module\_stdout”: “Traceback (most recent call last):\r\n File "/tmp/ansible\_xPOAZ0/ansible\_module\_firewalld.py", line 1017, in \r\n main()\r\n File "/tmp/ansible\_xPOAZ0/ansible\_module\_firewalld.py", line 856, in main\r\n port, protocol = module.params[‘port’].strip().split(‘/’)\r\nValueError: need more than 1 value to unpack\r\n”,

“msg”: “MODULE FAILURE”,

“rc”: 1

}

- name: Open NCPA Port (RedHat 7)

firewalld:

immediate: yes

permanent: yes

port: 5693

state: enabled

when: ansible\_distribution == “RedHat” and ansible\_distribution\_major\_version|int == 7

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [March 30, 2020, 10:25am UTC](https://forum.ansible.com/t/ansible-ssh-error/32560/2 "2020-03-30T10:25:27Z")

</div>

> From [https://docs.ansible.com/ansible/latest/modules/firewalld\_module.html#parameter-port](https://docs.ansible.com/ansible/latest/modules/firewalld_module.html#parameter-port)

it appears you need to add the protocol as well.  
Try:

port: 5693/tcp

---

<div class="post-metadata">

**Author:** ![Bala\_Mutyam](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@Bala\_Mutyam](https://forum.ansible.com/u/Bala_Mutyam)\
**Post date:** [March 30, 2020, 10:57am UTC](https://forum.ansible.com/t/ansible-ssh-error/32560/3 "2020-03-30T10:57:35Z")

</div>

Thanks, It’s working now.
