Hi,

cloud you conncet to the host using ssh from a terminal without using the 
ansible module? Have you checked that the subsystem sftp line in 
/etc/ssh/sshd_config on your host points to an existent sftp-server binary?

Regards,
Joerg

Am Montag, 6. März 2017 16:18:18 UTC+1 schrieb [email protected]:
>
> Hi! 
> I have the same problem but i don´t know the solution.
>
> ssh found, scp found, but the ping said that "ERROR! SSH Error: data could 
> not be sent to the remote host. Make sure this host can be reached over ssh"
>
> This is the output of  ansible -vvvv  all -m ping: 
>
> Loaded callback minimal of type stdout, v2.0
> <192.168.69.190> ESTABLISH SSH CONNECTION FOR USER: None
> <192.168.69.190> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o 
> ControlPersist=60s -o KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.
> ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.69.190 '( umask 22 && mkdir 
> -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1488791696.73-239421557112032 )" 
> && echo "$( echo 
> $HOME/.ansible/tmp/ansible-tmp-1488791696.73-239421557112032 )" )'
> <192.168.69.104> ESTABLISH SSH CONNECTION FOR USER: None
> <192.168.69.104> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o 
> ControlPersist=60s -o KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.
> ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.69.104 '( umask 22 && mkdir 
> -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1488791696.74-88043441209635 )" 
> && echo "$( echo 
> $HOME/.ansible/tmp/ansible-tmp-1488791696.74-88043441209635 )" )'
> <192.168.69.190> PUT /tmp/tmpuh7eyZ TO /root/.ansible/tmp/ansible-tmp-
> 1488791696.73-239421557112032/ping
> <192.168.69.190> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o 
> ControlPersist=60s -o KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.
> ansible/cp/ansible-ssh-%h-%p-%r '[192.168.69.190]'
> <192.168.69.190> ESTABLISH SSH CONNECTION FOR USER: None
> <192.168.69.190> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o 
> ControlPersist=60s -o KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.
> ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.69.190 'LANG=en_US.UTF-8 
> LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python 
> /root/.ansible/tmp/ansible-tmp-1488791696.73-239421557112032/ping; rm -rf 
> "/root/.ansible/tmp/ansible-tmp-1488791696.73-239421557112032/" > /dev/null 
> 2>&1'
> 192.168.69.190 | SUCCESS => {
>     "changed": false,
>     "invocation": {
>         "module_args": {
>             "data": null
>         },
>         "module_name": "ping"
>     },
>     "ping": "pong"
> }
> <192.168.69.104> PUT /tmp/tmpfmBWoS TO /root/.ansible/tmp/ansible-tmp-
> 1488791696.74-88043441209635/ping
> <192.168.69.104> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o 
> ControlPersist=60s -o KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.
> ansible/cp/ansible-ssh-%h-%p-%r '[192.168.69.104]'
> 192.168.69.104 | UNREACHABLE! => {
>     "changed": false,
>     "msg": "ERROR! SSH Error: data could not be sent to the remote host. 
> Make sure this host can be reached over ssh",
>     "unreachable": true
> }
>
>
>
>
> TY!
>
>
> Jorge
>
> El viernes, 15 de julio de 2016, 9:55:01 (UTC+2), Jörg Kastning escribió:
>>
>> Hello there,
>>
>> before executing the following commands I started a ssh-agent bash and 
>> added my private key.
>>
>> Running the command "ansible all -m ping" checks succeeded but one. For 
>> one host I got the following error:
>> host1.example.com | UNREACHABLE! => {
>>     "changed": false,
>>     "msg": "SSH Error: data could not be sent to the remote host. Make 
>> sure this host can be reached over ssh",
>>     "unreachable": true
>> }
>>
>> But when I run the following command in the same shell, the connection is 
>> successful:
>> ssh [email protected]
>>
>> The section in my inventory file looks like:
>> [host-group]
>> host[1:2].example.com
>> host-test.example.com
>>
>> Only host1 fails, the other two are checkt successfully.
>>
>> I use ansible 2.1.0.0  from EPEL-Repo with RHEL 7.2.
>>
>> Could someone explain to me what's wrong here?
>>
>> Kind regards,
>> Joerg
>>
>
> "Este mensaje está dirigido de manera exclusiva a su destinatario y puede 
> contener información privada y confidencial. No lo reenvíe, copie o 
> distribuya a terceros que no deban conocer su contenido. En caso de haberlo 
> recibido por error,  rogamos lo notifique al remitente y proceda a su 
> borrado, así como al de cualquier documento que pudiera adjuntarse.
>
>  Por favor tenga en cuenta que los correos enviados vía Internet no 
> permiten garantizar la confidencialidad de los mensajes ni su transmisión 
> de forma íntegra.
>
>  Las opiniones expresadas en el presente correo pertenecen únicamente al 
> remitente y no representan necesariamente la opinión del Grupo BBVA."
>
>  "This message is intended exclusively for the adressee and may contain 
> privileged and confidential information. Please, do not disseminate, copy 
> or distribute it to third parties who should not receive it. In case you 
> have received it by mistake, please inform the sender and delete the 
> message and attachments from your system.
>
>  Please keep in mind that e-mails sent by Internet do not allow to 
> guarantee neither the confidentiality or the integrity of the messages 
> sent."
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/390729fd-0ce0-470f-a162-054ebc4c070d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to