# Problem with Ansible on Network Automation appliance

**URL:** <https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266>\
**Category:** Get Help\
**Tags:** ansible, ansible-project, ubuntu\
**Created:** [February 14, 2025, 10:50am UTC](https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266 "2025-02-14T10:50:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skyglider](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/skyglider/32/7590_2.png) [@Skyglider](https://forum.ansible.com/u/Skyglider)\
**Post date:** [February 14, 2025, 10:50am UTC](https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266/1 "2025-02-14T10:50:29Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![iwt-cmd](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/iwt-cmd/32/9120_2.png) [@iwt-cmd](https://forum.ansible.com/u/iwt-cmd)\
**Post date:** [February 14, 2025, 11:37am UTC](https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266/2 "2025-02-14T11:37:12Z")

</div>

Hi Skyglider,

I don’t have a GNS3 environment to test the appliance but did you do an “apt-get update” prior to attempting to install sshpass?

---

<div class="post-metadata">

**Author:** ![Skyglider](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/skyglider/32/7590_2.png) [@Skyglider](https://forum.ansible.com/u/Skyglider)\
**Post date:** [February 15, 2025, 11:56pm UTC](https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266/3 "2025-02-15T23:56:09Z")

</div>

HI Joe, yes of course I I did “apt-get update” but that didn’t help

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chris/32/293_2.png) [@chris](https://forum.ansible.com/u/chris)\
**Post date:** [February 16, 2025, 10:17am UTC](https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266/4 "2025-02-16T10:17:27Z")

</div>

The `sshpass` package is available on Debian and Ubuntu,  
what Linux distro are you running — what is a _“GNS3 environment”_ based on? What do you have in `/etc/apt/sources.list` and what is in any files in `/etc/apt/sources.list.d/`?

---

<div class="post-metadata">

**Author:** ![Skyglider](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/skyglider/32/7590_2.png) [@Skyglider](https://forum.ansible.com/u/Skyglider)\
**Post date:** [February 17, 2025, 2:13pm UTC](https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266/5 "2025-02-17T14:13:44Z")

</div>

Hi Chris ,

This is what I have in the output **cat /etc/apt/sources.list**

> **[notepad.link](https://notepad.link/o6I9d)**
>
> Free and anonymous online notepad link that you can share & customize!

I need to share via online notepad link because I cannot post it here , system isn’t allowing me.

And this is what I have in the directory **/etc/apt/sources.list.d/**

root@NetworkAutomation-1:/etc/apt/sources.list.d# ls  
ansible-ubuntu-ansible-focal.list ansible-ubuntu-ansible-focal.list.save

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chris/32/293_2.png) [@chris](https://forum.ansible.com/u/chris)\
**Post date:** [February 17, 2025, 3:03pm UTC](https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266/6 "2025-02-17T15:03:56Z")

</div>

That’s very odd, unless the `/etc/apt/sources.list.d/ansible-ubuntu-ansible-focal.list` is the cause of the issue (what does it contain?) this line in your `/etc/apt/sources.list`:

```auto
deb http://archive.ubuntu.com/ubuntu/ focal universe

```

Should enable `sshpass` to be installed as [the package is in universe for focal](https://packages.ubuntu.com/focal/sshpass).

Perhaps try moving the `/etc/apt/sources.list` somewhere and replace the file with something like this:

```txt
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu focal partner
deb [arch=amd64] https://apt.releases.hashicorp.com focal main

```

And then try:

```bash
apt-get update
apt-get install sshpass

```

---

<div class="post-metadata">

**Author:** ![Skyglider](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/skyglider/32/7590_2.png) [@Skyglider](https://forum.ansible.com/u/Skyglider)\
**Post date:** [February 17, 2025, 8:14pm UTC](https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266/7 "2025-02-17T20:14:25Z")

</div>

Chris I tried what you proposed, I moved **/etc/apt/sources.list** to another directory and I created new file with the same name and added your links but that didn’t help , still is same

> root@NetworkAutomation-1:~# apt-get install sshpass  
> 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

**ansible-ubuntu-ansible-focal.list** contains this:

> root@NetworkAutomation-1:/etc/apt/sources.list.d# cat ansible-ubuntu-ansible-focal.list  
> deb [Index of /ansible/ansible/ubuntu](http://ppa.launchpad.net/ansible/ansible/ubuntu) focal main  
> #deb-src [Index of /ansible/ansible/ubuntu](http://ppa.launchpad.net/ansible/ansible/ubuntu) focal main

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chris/32/293_2.png) [@chris](https://forum.ansible.com/u/chris)\
**Post date:** [February 17, 2025, 8:51pm UTC](https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266/8 "2025-02-17T20:51:19Z")

</div>

Are you able to update or install _any_ packages?

Sorry I don’t know why `apt` isn’t working for you, perhaps directly down the package and install it, all the different versions are in [this directory](https://archive.ubuntu.com/ubuntu/pool/universe/s/sshpass/), for focal you want [version 1.06-1](https://archive.ubuntu.com/ubuntu/pool/universe/s/sshpass/sshpass_1.06-1_amd64.deb):

```bash
wget https://archive.ubuntu.com/ubuntu/pool/universe/s/sshpass/sshpass_1.06-1_amd64.deb
dpkg -i sshpass_1.06-1_amd64.deb

```

---

<div class="post-metadata">

**Author:** ![Skyglider](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/skyglider/32/7590_2.png) [@Skyglider](https://forum.ansible.com/u/Skyglider)\
**Post date:** [February 18, 2025, 9:28pm UTC](https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266/9 "2025-02-18T21:28:34Z")

</div>

No , I am not able to install any packages. Not sure what is the problem, I wasted a lot of time on this and I need to practice Ansible automation in networking. Thanks for your help. Do you know what is the best way to transfer the package **sshpass\_1.06-1\_amd64.deb** to the Appliance ?

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chris/32/293_2.png) [@chris](https://forum.ansible.com/u/chris)\
**Post date:** [February 18, 2025, 9:54pm UTC](https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266/10 "2025-02-18T21:54:21Z")

</div>

If you can connect to the Internet download the package with `wget` or another CLI HTTP client, if it can’t connect to any external services you but you have SSH access to it you could `scp` the file onto the server?

---

<div class="post-metadata">

**Author:** ![Skyglider](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/skyglider/32/7590_2.png) [@Skyglider](https://forum.ansible.com/u/Skyglider)\
**Post date:** [February 18, 2025, 11:13pm UTC](https://forum.ansible.com/t/problem-with-ansible-on-network-automation-appliance/40266/11 "2025-02-18T23:13:34Z")

</div>

I can connect it to the internet but **wget** is not working and I cannot install it. Also it wont allow me to **ssh** it because I need to install **openssh-server** and I cannot, wont allow me to install. So I am in some loop now with this. Have no idea what to do.
