# ansible tower - command works BUT playbook fails to connect to the host via ssh

**URL:** <https://forum.ansible.com/t/ansible-tower-command-works-but-playbook-fails-to-connect-to-the-host-via-ssh/33165>\
**Category:** Ansible Project\
**Tags:** ansible-project, awx\
**Created:** [June 12, 2020, 3:54pm UTC](https://forum.ansible.com/t/ansible-tower-command-works-but-playbook-fails-to-connect-to-the-host-via-ssh/33165 "2020-06-12T15:54:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [June 12, 2020, 3:54pm UTC](https://forum.ansible.com/t/ansible-tower-command-works-but-playbook-fails-to-connect-to-the-host-via-ssh/33165/1 "2020-06-12T15:54:33Z")

</div>

> In my ansible tower I can execute a command successfully on a remote server, however when I try to run a playbook I get:
> 
> {  
> "msg": "Failed to connect to the host via ssh: Warning: Permanently added 'hostname,10.1.4.66' (ECDSA) to the list  
> of known hosts.\r\nPermission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).",  
> "unreachable": true,  
> "changed": false  
> }
> 
> Seems to be a weird issue, did someone saw and solved this before?

This group is dedicated to Ansible itself, not Tower or AWX.

Please contact RedHat support.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Thanh\_Nguyen\_Duc](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@Thanh\_Nguyen\_Duc](https://forum.ansible.com/u/Thanh_Nguyen_Duc)\
**Post date:** [June 13, 2020, 1:06am UTC](https://forum.ansible.com/t/ansible-tower-command-works-but-playbook-fails-to-connect-to-the-host-via-ssh/33165/2 "2020-06-13T01:06:21Z")

</div>

Try to run with sudo?
