# SFTP and SCP issues from ansible ubuntu to cisco ios 15.0

**URL:** <https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730>\
**Category:** Get Help\
**Tags:** cisco, ubuntu, network\
**Created:** [July 4, 2025, 5:22pm UTC](https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730 "2025-07-04T17:22:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssbipa6](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ssbipa6/32/8987_2.png) [@ssbipa6](https://forum.ansible.com/u/ssbipa6)\
**Post date:** [July 4, 2025, 5:22pm UTC](https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730/1 "2025-07-04T17:22:07Z")

</div>

Good day good peoplem  
I am doing my labs on EVE-NG and its the time to practice what i have studied, This is the error I am getting when trying to use a ping module. I am sure there will be more errors, or there is more deadly errors in my system, but for now I want to sort out this SFTP and SCP error. I believe the first issue is, my images are old.  
Would someone please guide on how to fix this, I an running ubuntu on VMWARE.

I have added few pics, where i can ssh directly to the ios and i can ping the eve-ng vm running these cisco devices

Thanks in advance.

In case my pics are not uploaded I have copied errors I’m getting:

**Hosts**

[Routers]  
R-1 ansible\_host=192.168.126.130 ansible\_python\_interpreter=/usr/bin/python3  
R-2 ansible\_host=192.168.126.132 ansible\_python\_interpreter=/usr/bin/python3  
R-3 ansible\_host=192.168.126.131 ansible\_python\_interpreter=/usr/bin/python3  
R-5 ansible\_host=192.168.126.136 ansible\_python\_interpreter=/usr/bin/python3

[Eveng]  
eve-ng ansible\_host=192.168.126.129 ansible\_python\_interpreter=/usr/bin/python3  
saul@bipa:/etc/ansible$

**nornal ssh**

saul@bipa:/etc/ansible$ ssh [admin@192.168.126.130](mailto:admin@192.168.126.130)

* * *

- IOSv is strictly limited to use for evaluation, demonstration and IOS \*
- education. IOSv is provided as-is and is not supported by Cisco’s \*
- Technical Advisory Center. Any use or disclosure, in whole or in part, \*
- of the IOSv Software or Documentation to any third party for any \*
- purposes is expressly prohibited except as otherwise authorized by \*
- Cisco in writing. \*  
([admin@192.168.126.130](mailto:admin@192.168.126.130)) Password: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

* * *

- IOSv is strictly limited to use for evaluation, demonstration and IOS \*
- education. IOSv is provided as-is and is not supported by Cisco’s \*
- Technical Advisory Center. Any use or disclosure, in whole or in part, \*
- of the IOSv Software or Documentation to any third party for any \*
- purposes is expressly prohibited except as otherwise authorized by \*
- Cisco in writing. \*

* * *

R-1\>

**ansible ping module**  
[WARNING]: sftp transfer mechanism failed on [192.168.126.130]. Use  
ANSIBLE\_DEBUG=1 to see detailed information  
[WARNING]: scp transfer mechanism failed on [192.168.126.130]. Use  
ANSIBLE\_DEBUG=1 to see detailed information  
R-1 | FAILED! =\> {  
“changed”: false,  
“module\_stderr”: “\r\n\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\r\n\* IOSv is strictly limited to use for evaluation, demonstration and IOS _\r\n_ education. IOSv is provided as-is and is not supported by Cisco’s _\r\n_ Technical Advisory Center. Any use or disclosure, in whole or in part, _\r\n_ of the IOSv Software or Documentation to any third party for any _\r\n_ purposes is expressly prohibited except as otherwise authorized by _\r\n_ Cisco in writing. \*\r\n\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Shared connection to 192.168.126.130 closed.\r\n”,  
“module\_stdout”: “\r\nLine has invalid autocommand "/bin/sh -c ‘/usr/bin/python3 ‘"’"‘Line has invalid autocommand "/bin/sh -c ‘"’"’"’"‘"’"‘"’"‘( umask 77 && mkdir -p "` echo Line has invalid autocommand "/bin/sh -c ‘"’"’"‘"’"‘"’"‘"’"‘"’"‘"’"‘"’"‘"’"‘"’"‘"’"‘"’"‘"’"‘"‘echo ~admin && sleep 0’"’"‘"’"‘"’"‘"’""”,  
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,  
“rc”: 0

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [July 7, 2025, 1:18pm UTC](https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730/2 "2025-07-07T13:18:50Z")

</div>

Just because you’re running EVE-NG on VMware vSphere / ESXi this doesn’t make it a VMWARE problem. So please don’t tag it like this.

Anyway, isn’t this more or less the same question you’ve already asked in [SFTP and SCP errors when trying to ping my cisco IOSv on Eve-NG](https://forum.ansible.com/t/43729)? At least, it looks related… maybe I’m wrong, but if I’m right: Please don’t clutter the forum with opening several threads on the same issue 🙏

---

<div class="post-metadata">

**Author:** ![mikemorency](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mikemorency/32/2672_2.png) [@mikemorency](https://forum.ansible.com/u/mikemorency)\
**Post date:** [July 7, 2025, 1:42pm UTC](https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730/3 "2025-07-07T13:42:09Z")

</div>

I googled “line has invalid autocommand” and the first two results show that for IOS devices, you need to set additional variables/use specific IOS modules when possible.  
Try setting

```auto
ansible_connection=network_cli
ansible_network_os=ios
ansible_port=22

```

For future issues, you will get more responses if you follow Mario’s advice (and format your posts using code blocks with three back ticks ```)

---

<div class="post-metadata">

**Author:** ![ssbipa6](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ssbipa6/32/8987_2.png) [@ssbipa6](https://forum.ansible.com/u/ssbipa6)\
**Post date:** [July 8, 2025, 8:25am UTC](https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730/4 "2025-07-08T08:25:36Z")

</div>

Thanks Mariolenz for your answer, The reasons you see vmware in my issuem is because i needed to be as clear and put everything on the table incase I am missing something and not blaming vmware, How can i blame something that I am looking for help on? I was just stating what I have and what errors I am getting, Please understand rather.  
and yes, the link you copied is also me, and is the same issue.

---

<div class="post-metadata">

**Author:** ![ssbipa6](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ssbipa6/32/8987_2.png) [@ssbipa6](https://forum.ansible.com/u/ssbipa6)\
**Post date:** [July 8, 2025, 8:29am UTC](https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730/5 "2025-07-08T08:29:22Z")

</div>

Hi Mikemorencym

I will look into it, I am not sure if those vars should be added to cfg file, or playbook itself, My issue is far from playbook, I am just testing my connectivity, I had ssh issues, and they are being cleared step by step, Now, I am stuck here, which i cannot seem to get around. I will get to the bottom of this.  
Thanks once again  
Saul

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [July 8, 2025, 1:04pm UTC](https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730/6 "2025-07-08T13:04:09Z")

</div>

> [@ssbipa6](#):
>
> The reasons you see vmware in my issuem is because i needed to be as clear and put everything on the table incase I am missing something and not blaming vmware

No problem there, giving as much information as possible is a good thing. This helps people to help you.

But IIRC you’ve used the `vmware` tag (which I have removed). The problem here is not that I’m saying you’re blaming VMware, but that people are watching this tag to help people who have problems with VMware. If they see too many threads tagged `vmware` just because the problem turns up in a VM that’s running on VMware, they might stop watching this tag because there are too many false positives. And this would be bad for people looking for help on problems that are really VMware related. Your problem doesn’t look like it is.

I hope someone can help you with your problem!

---

<div class="post-metadata">

**Author:** ![ssbipa6](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ssbipa6/32/8987_2.png) [@ssbipa6](https://forum.ansible.com/u/ssbipa6)\
**Post date:** [July 8, 2025, 2:32pm UTC](https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730/7 "2025-07-08T14:32:54Z")

</div>

Thank you for the clarification.  
I didn’t recognise that I tagged em.  
Thanks.

---

<div class="post-metadata">

**Author:** ![Leo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/leo/32/23_2.png) [@Leo](https://forum.ansible.com/u/Leo)\
**Post date:** [July 8, 2025, 9:55pm UTC](https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730/8 "2025-07-08T21:55:07Z")

</div>

> [@mariolenz](#):
>
> But IIRC you’ve used the `vmware` tag (which I have removed). The problem here is not that I’m saying you’re blaming VMware, but that people are watching this tag to help people who have problems with VMware. If they see too many threads tagged `vmware` just because the problem turns up in a VM that’s running on VMware, they might stop watching this tag because there are too many false positives. And this would be bad for people looking for help on problems that are really VMware related. Your problem doesn’t look like it is.

@mariolenz @ssbipa6 the vmware tag might have been an automated one due to the parent post mentioning it.

You will notice some topics get tagged automatically, this was setup when the forum went live to ease the pain of classifying each thread manually. @mariolenz if you think this is causing issues with too many false positives for vmware we can revisit that decision.

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [July 9, 2025, 11:00am UTC](https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730/9 "2025-07-09T11:00:54Z")

</div>

If the tag has been added automatically, I think I have to apologize. Sorry @ssbipa6!

At the end of the day, I just want to avoid having too many threads tagged with `vmware` just because the question is about something that happens to run on VMware vSphere but isn’t related to virtualization. This might discourage people to watch this tag and help others with issues that really _are_ related to VMware.

I don’t have any data on how often false ppositives happen. Just wanted to raise awareness to this.

---

<div class="post-metadata">

**Author:** ![ssbipa6](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ssbipa6/32/8987_2.png) [@ssbipa6](https://forum.ansible.com/u/ssbipa6)\
**Post date:** [July 9, 2025, 11:50am UTC](https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730/10 "2025-07-09T11:50:56Z")

</div>

Thanks mariolenz. I have learnt something.

---

<div class="post-metadata">

**Author:** ![Leo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/leo/32/23_2.png) [@Leo](https://forum.ansible.com/u/Leo)\
**Post date:** [July 16, 2025, 3:01pm UTC](https://forum.ansible.com/t/sftp-and-scp-issues-from-ansible-ubuntu-to-cisco-ios-15-0/43730/11 "2025-07-16T15:01:04Z")

</div>

> [@mariolenz](#):
>
> At the end of the day, I just want to avoid having too many threads tagged with `vmware` just because the question is about something that happens to run on VMware vSphere but isn’t related to virtualization. This might discourage people to watch this tag and help others with issues that really _are_ related to VMware.

You are right in calling it out, thank you for that. And vmware might be more prone than other keywords to cause false positives, as it’s probably added most of the time as “context”. If you notice there is a bad ratio of false positives, let us know and we can remove the autotag
