I only removed the SSH key to remove pub key authentication from the router. As it’s the first authentication protocol used, the ansible command was ignoring the passed in username/password. It was for testing only. Your router config does pub key -> kbd interactive -> password authentication out the box. If you’ve got a working ssh key then it won’t get to password auth.
I think you’re hitting the bug I mentioned. I did some testing yesterday with pip installs around paramiko and it broke with later versions. Check your version : pip list | grep paramiko Try pinning it to 2.0.2 - pip install paramiko==2.0.2 (you might need to use sudo with this depending on where you’ve installed, if you’re not root) > On 22 Jan 2020, at 08:11, Yehuda Pinhas <[email protected]> wrote: > > [ansible@Netauto-Dev new_vlan]$ ansible -m ios_command -e commands='sh ip int > br' -i /etc/ansible/inventory/ R-TEST-SNIF -e > 'ansible_connection=network_cli' -e 'ansible_network_os=ios' -e > 'remote_user=ansible' -k > SSH password: > [WARNING]: Found variable using reserved name: remote_user > > R-TEST-SNIF | FAILED! => { > "changed": false, > "msg": "No existing session" > > > This is my result.. > > I think I dont understand a couple of things: > 1. Why do you have to remove the SSH keys from the router? should'nt it use > the SSH keys as primary method and then fallback to using password? > 2. What exactly did you do on the cisco device to remove the keys? (although > I dont beleive it is a solution for me since I cant remove SSH keys on > devices in my real network) > 3. There isn't a way to do password authentication without removing SSH keys? > > -- > You received this message because you are subscribed to a topic in the Google > Groups "Ansible Project" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/ansible-project/VeJcHLrMyQc/unsubscribe > <https://groups.google.com/d/topic/ansible-project/VeJcHLrMyQc/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to > [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/02bb6e11-cfd3-41fe-b52e-7fc8433a1991%40googlegroups.com > > <https://groups.google.com/d/msgid/ansible-project/02bb6e11-cfd3-41fe-b52e-7fc8433a1991%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/EBEC8567-0243-4BC2-94C9-A741E2B2DE13%40gmail.com.
