I added Network Automation appliance to GNS3 so I can practice automation on Cisco routers
I configured everything properly but when I try to execute command
ansible myhosts -m ping -i inventory.ini
I get this:
192.168.1.1 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: root@192.168.1.1: Permission denied (keyboard-interactive,password).",
"unreachable": true
}
I tried with command ansible myhosts -m ping -i inventory.ini --ask-pass
But then I get this :
192.168.1.1 | FAILED! => {
"msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program"
Of course I tried to install sshpass but I cannot, showing me this output
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package sshpass is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘sshpass’ has no installation candidate
Does anyone knows a solution for this ?? I tried everything, last two days I am checking on Google and YouTube but haven’t found a solution for this.
Thank you!