Ansible and IOS: {"msg": "No authentication methods available"}

2,461 views
Skip to first unread message

ali.bous...@gmail.com

unread,
Jun 19, 2018, 3:30:34 PM6/19/18
to Ansible Project
Hi everyone,

I have installed ansible 2.5.4 on Ubuntu 18.04 (have also tried Ansible 2.2 on Ubuntu 16.04) 
When I use ansible to connect to Cisco IOS, I got this error message: fatal: [192.168.144.10]: FAILED! => {"msg": "No authentication methods available"}

I am able to ssh to my router from the Ubuntu via "ssh ci...@192.168.144.10"

But when I am using ansible, this happens:

root@ansible:/etc/ansible# ansible --version
ansible 2.5.4
  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.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]


root@ansible:/mnt/Inventory_Examples# ansible-playbook -i host_1 IOS_Test_1.yml  -vvv
..
omitted 
....

The full traceback is:
Traceback (most recent call last):
  File "/usr/bin/ansible-connection", line 87, in start
    self.connection._connect()
  File "/usr/lib/python2.7/dist-packages/ansible/plugins/connection/network_cli.py", line 292, in _connect
    ssh = self.paramiko_conn._connect()
  File "/usr/lib/python2.7/dist-packages/ansible/plugins/connection/paramiko_ssh.py", line 240, in _connect
    self.ssh = SSH_CONNECTION_CACHE[cache_key] = self._connect_uncached()
  File "/usr/lib/python2.7/dist-packages/ansible/plugins/connection/paramiko_ssh.py", line 348, in _connect_uncached
    raise AnsibleConnectionFailure(msg)
AnsibleConnectionFailure: No authentication methods available

..
omitted 
....

Thanks in advance!!!

John Barker

unread,
Jun 20, 2018, 11:16:47 AM6/20/18
to Ansible Project
Hi,
We suggest using Ansible 2.5

Have a read through the documentation at https://docs.ansible.com/ansible/latest/network/

If you have further questions feel free to post them here.

Kind regards,
John "gundalow" Barker

ali.bous...@gmail.com

unread,
Jun 20, 2018, 12:58:43 PM6/20/18
to Ansible Project
Hi,
Thank you for your time!
Following the Ansible document for 2.5 solved the issue!

Thank you again 
Reply all
Reply to author
Forward
0 new messages