# getting "failed to open a SFTP connection" error

**URL:** <https://forum.ansible.com/t/getting-failed-to-open-a-sftp-connection-error/14503>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [February 6, 2014, 1:42am UTC](https://forum.ansible.com/t/getting-failed-to-open-a-sftp-connection-error/14503 "2014-02-06T01:42:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![YuLing\_Chen](https://avatars.discourse-cdn.com/v4/letter/y/4491bb/32.png) [@YuLing\_Chen](https://forum.ansible.com/u/YuLing_Chen)\
**Post date:** [February 6, 2014, 1:42am UTC](https://forum.ansible.com/t/getting-failed-to-open-a-sftp-connection-error/14503/1 "2014-02-06T01:42:49Z")

</div>

Hi All,

I’m new to Ansible and trying to run the ansible commands against a remote VM Ubuntu instance. I set up ssh so that I was able to ssh to this VM Ubuntu instance without password. However, when I run ansible commands, if I do not provide user name and password, I got “Authentication failed” error message. If I use ‘-u and --ass-pass’, then I got “failed to open a SFTP connection” error message. The following is the output details from command window of the ansible client:

[root@localhost test]# ansible -i tvmc\_host all -m ping  
172.17.252.208 | FAILED =\> FAILED: Authentication failed.  
[root@localhost test]# ansible -i tvmc\_host all -m ping -u cli --ask-pass  
SSH password:  
172.17.252.208 | FAILED =\> failed to open a SFTP connection (EOF during negotiation)

Any idea what was missing in this case?  
Thanks very much in advance for the help.

-YuLing
