Getting Error while running playbook "msg": "[Errno None] Unable to connect to port 22

Hello Experts,

I have installed ansible using homebrew.

While trying to run few IOS command from my mac PC via jump server I am getting below errors.

<x.x.x.x1> ESTABLISH LOCAL CONNECTION FOR USER: root
<x.x.x.x1> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /var/root/.ansible/tmp/ansible-local-13708nory1o1s”&& mkdir “echo /var/root/.ansible/tmp/ansible-local-13708nory1o1s/ansible-tmp-1622963425.282479-13711-84468633356984” && echo ansible-tmp-1622963425.282479-13711-84468633356984=“echo /var/root/.ansible/tmp/ansible-local-13708nory1o1s/ansible-tmp-1622963425.282479-13711-84468633356984” ) && sleep 0’
<x.x.x.x1> Attempting python interpreter discovery
<x.x.x.x1> EXEC /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’
<x.x.x.x1> Python interpreter discovery fallback (unsupported platform for extended discovery: darwin)
Using module file /usr/local/Cellar/ansible/3.4.0/libexec/lib/python3.9/site-packages/ansible_collections/cisco/ios/plugins/modules/ios_command.py
<x.x.x.x1> PUT /private/var/root/.ansible/tmp/ansible-local-13708nory1o1s/tmp0d1cl3d7 TO /private/var/root/.ansible/tmp/ansible-local-13708nory1o1s/ansible-tmp-1622963425.282479-13711-84468633356984/AnsiballZ_ios_command.py
<x.x.x.x1> EXEC /bin/sh -c ‘chmod u+x /var/root/.ansible/tmp/ansible-local-13708nory1o1s/ansible-tmp-1622963425.282479-13711-84468633356984/ /var/root/.ansible/tmp/ansible-local-13708nory1o1s/ansible-tmp-1622963425.282479-13711-84468633356984/AnsiballZ_ios_command.py && sleep 0’
<x.x.x.x1> EXEC /bin/sh -c ‘/usr/bin/python /var/root/.ansible/tmp/ansible-local-13708nory1o1s/ansible-tmp-1622963425.282479-13711-84468633356984/AnsiballZ_ios_command.py && sleep 0’
<x.x.x.x1> EXEC /bin/sh -c ‘rm -f -r /var/root/.ansible/tmp/ansible-local-13708nory1o1s/ansible-tmp-1622963425.282479-13711-84468633356984/ > /dev/null 2>&1 && sleep 0’
The full traceback is:
WARNING: The below traceback may not be related to the actual failure.
File “/tmp/ansible_cisco.ios.ios_command_payload_LjBijq/ansible_cisco.ios.ios_command_payload.zip/ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py”, line 94, in get_capabilities
capabilities = Connection(module._socket_path).get_capabilities()
File “/tmp/ansible_cisco.ios.ios_command_payload_LjBijq/ansible_cisco.ios.ios_command_payload.zip/ansible/module_utils/connection.py”, line 195, in rpc
raise ConnectionError(to_text(msg, errors=‘surrogate_then_replace’), code=code)
[WARNING]: Platform darwin on host x.x.x.x1 is using the discovered Python interpreter at /usr/bin/python, but future installation
of another Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html for more information.
fatal: [x.x.x.x1]: FAILED! => {
“ansible_facts”: {
“discovered_interpreter_python”: “/usr/bin/python”
},
“changed”: false,
“invocation”: {
“module_args”: {
“commands”: [
“show version”
],
“interval”: 1,
“match”: “all”,
“provider”: null,
“retries”: 10,
“wait_for”: null
}
},
“msg”: “[Errno None] Unable to connect to port 22 on x.x.x.x1”

ansible 2.10.9
config file = /private/etc/ansible/ansible.cfg
configured module search path = [‘/var/root/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/local/Cellar/ansible/3.4.0/libexec/lib/python3.9/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.9.5 (default, May 4 2021, 03:36:27) [Clang 12.0.0 (clang-1200.0.32.29)]

Also i can see it is trying connection with user root although i have defined new user to login to the managed hosts.

Host test1
Hostname x.x.x.x
User subu
IdentityFile ~/.ssh/id_rsa
Host test2
Hostname *
User subu
ProxyJump test1
ForwardAgent yes

host file configuration

bbb

ansible_connection=network_cli
use_persistent_connections=yes
ansible_port=22
ansible_ssh_port=22
ansible_network_os=ios
ansible_user=admin
ansible_ssh_user=admin
ansible_ssh_password=xxx
ansible_password=yyy

ansible.cfg

[defaults]:
inventory = /etc/ansible/bbb
#ask_pass = true
ansible_python_interpreter=/usr/bin/python3
ansible_connection=ssh
ansible_port=22
ansible_ssh_port=22
host_key_checking = no

Br//
Subrat

Hello Experts,
Any lead.

Hello Experts,

Can someone suggest.

Also i can see it is trying connection with user root although i have defined new user to login to the managed hosts.

First, I would check if the user can login to that server normally. If not, Ansible won’t be able to connect either. :slight_smile:

When you run the playbook are you running it logged in as that user? If not, it’s not a huge deal specify the user with --user (two dashes there)

Like… ansible-playbook ./testplaybook.yml --user subu

Add --ask-pass if you want it to prompt for the user’s password.

Thanks Reg for your reply. Yes i can able to ping and able to do ssh to the server.

In simpler way from MaC terminal i can directly login to the server via jump server. There is no issue looks like in .ssh configuration.

Is there any issue in python version with brew ansible.

Ansible.cfg config

[defaults]:
inventory = /etc/ansible/hosts
ansible_python_interpreter=/usr/bin/python3
host_key_checking = no
look_for_keys = False

.ssh config

sh-3.2# cat /Users/veda/.ssh/config
Host tot
Hostname x.x.x.x
User veda1
IdentityFile /Users/veda/.ssh/id_rsa
IdentitiesOnly yes

[epc]
y.y.y.y

Hosts file
[test:vars]
ansible_connection=network_cli
use_persistent_connections=yes
ansible_port=22
ansible_ssh_port=22
ansible_network_os=ios
ansible_user=ravi
#ansible_ssh_user=ravi
#ansible_ssh_password=xxxx
ansible_password=xxxx

Getting this error
“msg”: “[Errno None] Unable to connect to port 22 on y.y.y.y” Looks like playbook trying to run root user

If i am changing this in ansible.cfg getting this error.

defaults]:
inventory = /etc/ansible/hosts
ansible_python_interpreter=/usr/bin/python3
host_key_checking = no
look_for_keys = False

sh-3.2# cat ansible.cfg
[defaults]:
inventory = /etc/ansible/epchosts
ansible_python_interpreter=/usr/bin/python3
host_key_checking = no
look_for_keys = False
[paramiko_connection]
proxy_command = “ssh -6 -W [%h]:%p veda@x.x.x.x”

TASK [prepare SSD] ***********************************************************************************************************************************************
task path: /private/etc/ansible/test3.yaml:6
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
redirecting (type: terminal) ansible.builtin.ios to cisco.ios.ios
redirecting (type: cliconf) ansible.builtin.ios to cisco.ios.ios
<y.y.y.y> attempting to start connection
<y.y.y.y> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /usr/local/bin/ansible-connection
<y.y.y.y> local domain socket does not exist, starting it
<y.y.y.y> control socket path is /private/var/root/.ansible/pc/d7c20f3db8
<y.y.y.y> redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<y.y.y.y> Loading collection ansible.netcommon from /var/root/.ansible/collections/ansible_collections/ansible/netcommon
<y.y.y.y> redirecting (type: terminal) ansible.builtin.ios to cisco.ios.ios
<y.y.y.y> Loading collection cisco.ios from /usr/local/Cellar/ansible/3.4.0/libexec/lib/python3.9/site-packages/ansible_collections/cisco/ios
<y.y.y.y> redirecting (type: cliconf) ansible.builtin.ios to cisco.ios.ios
<y.y.y.y> local domain socket listeners started successfully
<y.y.y.y> loaded cliconf plugin ansible_collections.cisco.ios.plugins.cliconf.ios from path /usr/local/Cellar/ansible/3.4.0/libexec/lib/python3.9/site-packages/ansible_collections/cisco/ios/plugins/cliconf/ios.py for network_os ios
<y.y.y.y>
<y.y.y.y> local domain socket path is /private/var/root/.ansible/pc/d7c20f3db8
redirecting (type: action) cisco.ios.ios_command to cisco.ios.ios
redirecting (type: action) cisco.ios.ios_command to cisco.ios.ios
<y.y.y.y> ANSIBLE_NETWORK_IMPORT_MODULES: disabled
<y.y.y.y> ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended
<y.y.y.y> ESTABLISH LOCAL CONNECTION FOR USER: root
<y.y.y.y> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /var/root/.ansible/tmp/ansible-local-3053t1ampmv5”&& mkdir “echo /var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832” && echo ansible-tmp-1623334715.304031-3056-261623273235832=“echo /var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832” ) && sleep 0’
Including module_utils file ansible/init.py
Including module_utils file ansible/module_utils/init.py
Including module_utils file ansible/module_utils/_text.py
Including module_utils file ansible/module_utils/basic.py
Including module_utils file ansible/module_utils/common/_collections_compat.py
Including module_utils file ansible/module_utils/common/init.py
Including module_utils file ansible/module_utils/common/_json_compat.py
Including module_utils file ansible/module_utils/common/_utils.py
Including module_utils file ansible/module_utils/common/file.py
Including module_utils file ansible/module_utils/common/parameters.py
Including module_utils file ansible/module_utils/common/collections.py
Including module_utils file ansible/module_utils/common/process.py
Including module_utils file ansible/module_utils/common/sys_info.py
Including module_utils file ansible/module_utils/common/text/converters.py
Including module_utils file ansible/module_utils/common/text/init.py
Including module_utils file ansible/module_utils/common/text/formatters.py
Including module_utils file ansible/module_utils/common/validation.py
Including module_utils file ansible/module_utils/common/warnings.py
Including module_utils file ansible/module_utils/compat/selectors.py
Including module_utils file ansible/module_utils/compat/init.py
Including module_utils file ansible/module_utils/compat/_selectors2.py
Including module_utils file ansible/module_utils/distro/init.py
Including module_utils file ansible/module_utils/distro/_distro.py
Including module_utils file ansible/module_utils/parsing/convert_bool.py
Including module_utils file ansible/module_utils/parsing/init.py
Including module_utils file ansible/module_utils/pycompat24.py
Including module_utils file ansible/module_utils/six/init.py
Including module_utils file ansible_collections/ansible/netcommon/plugins/module_utils/network/common/parsing.py
Including module_utils file ansible_collections/init.py
Including module_utils file ansible_collections/ansible/init.py
Including module_utils file ansible_collections/ansible/netcommon/init.py
Including module_utils file ansible_collections/ansible/netcommon/plugins/init.py
Including module_utils file ansible_collections/ansible/netcommon/plugins/module_utils/init.py
Including module_utils file ansible_collections/ansible/netcommon/plugins/module_utils/network/init.py
Including module_utils file ansible_collections/ansible/netcommon/plugins/module_utils/network/common/init.py
Including module_utils file ansible_collections/ansible/netcommon/plugins/module_utils/network/common/utils.py
Including module_utils file ansible/module_utils/common/network.py
Including module_utils file ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py
Including module_utils file ansible/module_utils/connection.py
Including module_utils file ansible/module_utils/common/json.py
Including module_utils file ansible_collections/cisco/init.py
Including module_utils file ansible_collections/cisco/ios/init.py
Including module_utils file ansible_collections/cisco/ios/plugins/init.py
Including module_utils file ansible_collections/cisco/ios/plugins/module_utils/init.py
Including module_utils file ansible_collections/cisco/ios/plugins/module_utils/network/init.py
Including module_utils file ansible_collections/cisco/ios/plugins/module_utils/network/ios/init.py
Using module file /usr/local/Cellar/ansible/3.4.0/libexec/lib/python3.9/site-packages/ansible_collections/cisco/ios/plugins/modules/ios_command.py
<y.y.y.y> PUT /private/var/root/.ansible/tmp/ansible-local-3053t1ampmv5/tmpnjsvn1oo TO /private/var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832/AnsiballZ_ios_command.py
<y.y.y.y> EXEC /bin/sh -c ‘chmod u+x /var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832/ /var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832/AnsiballZ_ios_command.py && sleep 0’
<y.y.y.y> EXEC /bin/sh -c ‘/usr/bin/python2 /var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832/AnsiballZ_ios_command.py && sleep 0’
<y.y.y.y> EXEC /bin/sh -c ‘rm -f -r /var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832/ > /dev/null 2>&1 && sleep 0’
The full traceback is:
WARNING: The below traceback may not be related to the actual failure.
File “/tmp/ansible_cisco.ios.ios_command_payload_TLabVW/ansible_cisco.ios.ios_command_payload.zip/ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py”, line 94, in get_capabilities
capabilities = Connection(module._socket_path).get_capabilities()
File “/tmp/ansible_cisco.ios.ios_command_payload_TLabVW/ansible_cisco.ios.ios_command_payload.zip/ansible/module_utils/connection.py”, line 195, in rpc
raise ConnectionError(to_text(msg, errors=‘surrogate_then_replace’), code=code)
fatal: [y.y.y.y]: FAILED! => {
“changed”: false,
“invocation”: {
“module_args”: {
“commands”: [
“show version”
],
“interval”: 1,
“match”: “all”,
“provider”: null,
“retries”: 10,
“wait_for”: null
}
},
“msg”: “Error reading SSH protocol banner”

Br//
Subrat
9535633166

Hello Reg,
Can you share your inputs.
I am trying to fetch show output from ASR Cisco devices using Mac PC via jump host to managed host.It should run all cli command from playbook and login all modes using jump host and save different files into destination path.
But for me it’s looks like issue in python version With ansible installed using brew.
I am not able to connect to managed hosts.
Br//
Subrat

Hello Experts
Can someone guide here.
Br//
Subrat

Hello Experts,

Can someone reply.

https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-configure-a-jump-host-to-access-servers-that-i-have-no-direct-access-to

Hi Phil,
Same i did but getting ssh banner error.

Ansible.cfg config

[defaults]:
inventory = /etc/ansible/hosts
ansible_python_interpreter=/usr/bin/python3
host_key_checking = no
look_for_keys = False

.ssh config

sh-3.2# cat /Users/veda/.ssh/config
Host tot
Hostname x.x.x.x
User veda1
IdentityFile /Users/veda/.ssh/id_rsa
IdentitiesOnly yes

[epc]
y.y.y.y

Hosts file
[test:vars]

ansible_connection=network_cli
use_persistent_connections=yes
ansible_port=22
ansible_ssh_port=22
ansible_network_os=ios

ansible_user=ravi
#ansible_ssh_user=ravi
#ansible_ssh_password=xxxx
ansible_password=xxxx

Getting this error
“msg”: “[Errno None] Unable to connect to port 22 on y.y.y.y” Looks like playbook trying to run root user

If i am changing this in ansible.cfg getting this error.

defaults]:
inventory = /etc/ansible/hosts
ansible_python_interpreter=/usr/bin/python3
host_key_checking = no
look_for_keys = False

sh-3.2# cat ansible.cfg
[defaults]:
inventory = /etc/ansible/epchosts
ansible_python_interpreter=/usr/bin/python3
host_key_checking = no
look_for_keys = False
[paramiko_connection]
proxy_command = “ssh -6 -W [%h]:%p veda@x.x.x.x”

TASK [prepare SSD] ***********************************************************************************************************************************************
task path: /private/etc/ansible/test3.yaml:6
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
redirecting (type: terminal) ansible.builtin.ios to cisco.ios.ios
redirecting (type: cliconf) ansible.builtin.ios to cisco.ios.ios
<y.y.y.y> attempting to start connection
<y.y.y.y> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /usr/local/bin/ansible-connection
<y.y.y.y> local domain socket does not exist, starting it
<y.y.y.y> control socket path is /private/var/root/.ansible/pc/d7c20f3db8
<y.y.y.y> redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<y.y.y.y> Loading collection ansible.netcommon from /var/root/.ansible/collections/ansible_collections/ansible/netcommon
<y.y.y.y> redirecting (type: terminal) ansible.builtin.ios to cisco.ios.ios
<y.y.y.y> Loading collection cisco.ios from /usr/local/Cellar/ansible/3.4.0/libexec/lib/python3.9/site-packages/ansible_collections/cisco/ios
<y.y.y.y> redirecting (type: cliconf) ansible.builtin.ios to cisco.ios.ios
<y.y.y.y> local domain socket listeners started successfully
<y.y.y.y> loaded cliconf plugin ansible_collections.cisco.ios.plugins.cliconf.ios from path /usr/local/Cellar/ansible/3.4.0/libexec/lib/python3.9/site-packages/ansible_collections/cisco/ios/plugins/cliconf/ios.py for network_os ios
<y.y.y.y>
<y.y.y.y> local domain socket path is /private/var/root/.ansible/pc/d7c20f3db8
redirecting (type: action) cisco.ios.ios_command to cisco.ios.ios
redirecting (type: action) cisco.ios.ios_command to cisco.ios.ios
<y.y.y.y> ANSIBLE_NETWORK_IMPORT_MODULES: disabled
<y.y.y.y> ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended
<y.y.y.y> ESTABLISH LOCAL CONNECTION FOR USER: root
<y.y.y.y> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /var/root/.ansible/tmp/ansible-local-3053t1ampmv5”&& mkdir “echo /var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832” && echo ansible-tmp-1623334715.304031-3056-261623273235832=“echo /var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832” ) && sleep 0’
Including module_utils file ansible/init.py
Including module_utils file ansible/module_utils/init.py
Including module_utils file ansible/module_utils/_text.py
Including module_utils file ansible/module_utils/basic.py
Including module_utils file ansible/module_utils/common/_collections_compat.py
Including module_utils file ansible/module_utils/common/init.py
Including module_utils file ansible/module_utils/common/_json_compat.py
Including module_utils file ansible/module_utils/common/_utils.py
Including module_utils file ansible/module_utils/common/file.py
Including module_utils file ansible/module_utils/common/parameters.py
Including module_utils file ansible/module_utils/common/collections.py
Including module_utils file ansible/module_utils/common/process.py
Including module_utils file ansible/module_utils/common/sys_info.py
Including module_utils file ansible/module_utils/common/text/converters.py
Including module_utils file ansible/module_utils/common/text/init.py
Including module_utils file ansible/module_utils/common/text/formatters.py
Including module_utils file ansible/module_utils/common/validation.py
Including module_utils file ansible/module_utils/common/warnings.py
Including module_utils file ansible/module_utils/compat/selectors.py
Including module_utils file ansible/module_utils/compat/init.py
Including module_utils file ansible/module_utils/compat/_selectors2.py
Including module_utils file ansible/module_utils/distro/init.py
Including module_utils file ansible/module_utils/distro/_distro.py
Including module_utils file ansible/module_utils/parsing/convert_bool.py
Including module_utils file ansible/module_utils/parsing/init.py
Including module_utils file ansible/module_utils/pycompat24.py
Including module_utils file ansible/module_utils/six/init.py
Including module_utils file ansible_collections/ansible/netcommon/plugins/module_utils/network/common/parsing.py
Including module_utils file ansible_collections/init.py
Including module_utils file ansible_collections/ansible/init.py
Including module_utils file ansible_collections/ansible/netcommon/init.py
Including module_utils file ansible_collections/ansible/netcommon/plugins/init.py
Including module_utils file ansible_collections/ansible/netcommon/plugins/module_utils/init.py
Including module_utils file ansible_collections/ansible/netcommon/plugins/module_utils/network/init.py
Including module_utils file ansible_collections/ansible/netcommon/plugins/module_utils/network/common/init.py
Including module_utils file ansible_collections/ansible/netcommon/plugins/module_utils/network/common/utils.py
Including module_utils file ansible/module_utils/common/network.py
Including module_utils file ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py
Including module_utils file ansible/module_utils/connection.py
Including module_utils file ansible/module_utils/common/json.py
Including module_utils file ansible_collections/cisco/init.py
Including module_utils file ansible_collections/cisco/ios/init.py
Including module_utils file ansible_collections/cisco/ios/plugins/init.py
Including module_utils file ansible_collections/cisco/ios/plugins/module_utils/init.py
Including module_utils file ansible_collections/cisco/ios/plugins/module_utils/network/init.py
Including module_utils file ansible_collections/cisco/ios/plugins/module_utils/network/ios/init.py
Using module file /usr/local/Cellar/ansible/3.4.0/libexec/lib/python3.9/site-packages/ansible_collections/cisco/ios/plugins/modules/ios_command.py
<y.y.y.y> PUT /private/var/root/.ansible/tmp/ansible-local-3053t1ampmv5/tmpnjsvn1oo TO /private/var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832/AnsiballZ_ios_command.py
<y.y.y.y> EXEC /bin/sh -c ‘chmod u+x /var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832/ /var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832/AnsiballZ_ios_command.py && sleep 0’
<y.y.y.y> EXEC /bin/sh -c ‘/usr/bin/python2 /var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832/AnsiballZ_ios_command.py && sleep 0’
<y.y.y.y> EXEC /bin/sh -c ‘rm -f -r /var/root/.ansible/tmp/ansible-local-3053t1ampmv5/ansible-tmp-1623334715.304031-3056-261623273235832/ > /dev/null 2>&1 && sleep 0’

The full traceback is:
WARNING: The below traceback may not be related to the actual failure.

File “/tmp/ansible_cisco.ios.ios_command_payload_TLabVW/ansible_cisco.ios.ios_command_payload.zip/ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py”, line 94, in get_capabilities
capabilities = Connection(module._socket_path).get_capabilities()
File “/tmp/ansible_cisco.ios.ios_command_payload_TLabVW/ansible_cisco.ios.ios_command_payload.zip/ansible/module_utils/connection.py”, line 195, in rpc

raise ConnectionError(to_text(msg, errors=‘surrogate_then_replace’), code=code)

fatal: [y.y.y.y]: FAILED! => {
“changed”: false,
“invocation”: {
“module_args”: {
“commands”: [
“show version”
],
“interval”: 1,
“match”: “all”,
“provider”: null,
“retries”: 10,
“wait_for”: null

}
},
“msg”: “Error reading SSH protocol banner”

Hell Experts,
Can anyone check and guide me?

Br//
Subrat

Hello Experts,
Can you plz guide.
Br//
Subrat

Hello Experts,

Hello All,

Can someone guide.

Hi
Can someone guide.

Hi,
Can someone guide

Any inputs?

Guys,
from ansible version 2.9 onwards, we need to add below lines in ansible.cfg file.

[paramiko_connection]
proxy_command = “ssh -o StrictHostKeyChecking=no -W %h:%p -q userid@JumpServerIP”