# How to connect ansible with switch exos

**URL:** <https://forum.ansible.com/t/how-to-connect-ansible-with-switch-exos/35972>\
**Category:** Ansible Project\
**Created:** [November 5, 2021, 5:05pm UTC](https://forum.ansible.com/t/how-to-connect-ansible-with-switch-exos/35972 "2021-11-05T17:05:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabiano\_Pamplona](https://avatars.discourse-cdn.com/v4/letter/f/b19c9b/32.png) [@Fabiano\_Pamplona](https://forum.ansible.com/u/Fabiano_Pamplona)\
**Post date:** [November 5, 2021, 5:05pm UTC](https://forum.ansible.com/t/how-to-connect-ansible-with-switch-exos/35972/1 "2021-11-05T17:05:05Z")

</div>

Hi all,

I’m new with ansible and I trying to connect ansible version 2.9 runs on CentOS with EXOS switch. I tried to connect via SSH using certificates, I put the pub certificate into EXOS switch and try to use command ssh-copy-id, but fails.  
In addiction I try to connect using some commands into yaml file, like:

- ansible\_network\_os: exos
- ansible\_connection: network\_cli  
All my tests are fail and I can’t connection on switch. When I run for example ansible ‘device name’ -m ping the system show me this error.

UNREACHABLE! =\> {  
“changed”: false,  
“msg”: “Failed to connect to the host via ssh: user@device: Permission denied (publickey,password).”,  
“unreachable”: true

Anybody can help me with that ?
