# "failed to open a SFTP connection (Garbage packet received)"

**URL:** <https://forum.ansible.com/t/failed-to-open-a-sftp-connection-garbage-packet-received/32872>\
**Category:** Ansible Project\
**Created:** [May 7, 2020, 8:58am UTC](https://forum.ansible.com/t/failed-to-open-a-sftp-connection-garbage-packet-received/32872 "2020-05-07T08:58:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Hodgkinson](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@Dave\_Hodgkinson](https://forum.ansible.com/u/Dave_Hodgkinson)\
**Post date:** [May 7, 2020, 8:58am UTC](https://forum.ansible.com/t/failed-to-open-a-sftp-connection-garbage-packet-received/32872/1 "2020-05-07T08:58:18Z")

</div>

I’m tring to run our corporate ansible setup on my FC31 laptop. In the “staging” configuration, main.yml, I have hosts: localhost. My ssh key is in root’s authorized\_keys file.

I run and get:

ansible-playbook main.yml

PLAY [Common tasks (various inc auth, firewall and update)] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
[WARNING]: Unhandled error in Python interpreter discovery for host localhost:  
unexpected output from Python interpreter discovery  
fatal: [localhost]: FAILED! =\> {“msg”: “failed to open a SFTP connection (Garbage packet received)”}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Any idea what’s going on? There’s no mention of sftp in my playbooks, I have vsftp installed.

---

<div class="post-metadata">

**Author:** ![Dave\_Hodgkinson](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@Dave\_Hodgkinson](https://forum.ansible.com/u/Dave_Hodgkinson)\
**Post date:** [May 7, 2020, 9:09am UTC](https://forum.ansible.com/t/failed-to-open-a-sftp-connection-garbage-packet-received/32872/2 "2020-05-07T09:09:02Z")

</div>

Never mind. .bashrc was outputting something and that blew sftp up.
