# ESTABLISH SSH CONNECTION FOR USER: ubuntu

**URL:** <https://forum.ansible.com/t/establish-ssh-connection-for-user-ubuntu/35587>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [August 5, 2021, 6:41am UTC](https://forum.ansible.com/t/establish-ssh-connection-for-user-ubuntu/35587 "2021-08-05T06:41:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fhf\_a](https://avatars.discourse-cdn.com/v4/letter/f/f1d935/32.png) [@Fhf\_a](https://forum.ansible.com/u/Fhf_a)\
**Post date:** [August 5, 2021, 6:41am UTC](https://forum.ansible.com/t/establish-ssh-connection-for-user-ubuntu/35587/1 "2021-08-05T06:41:47Z")

</div>

HELLO ALL  
I have problem with ansible ping from jenkins pipeline  
I try using  
ansible -i hosts prod -m ping

but I receive error

this is log from jenkins pipeline

 ![Screenshot 2021-08-05 at 09.35.19.png](https://us1.discourse-cdn.com/ansible/original/2X/6/67aac1c9d1019ac8728bd5b113d6b4fda1630668.png):

[Pipeline] sh + ansible -i hosts prod -m ping -vvv [DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. Current version: 2.7.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0]. This feature will be removed from ansible-core in version 2.12. Deprecation warnings can be disabled by setting deprecation\_warnings=False in ansible.cfg. ansible [core 2.11.3] config file = None configured module search path = [u’/home/jenkins/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’] ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible ansible collection location = /home/jenkins/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 2.7.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0] jinja version = 2.11.3 libyaml = True No config file found; using defaults host\_list declined parsing /home/jenkins/workspace/test\_docker\_cloud/hosts as it did not pass its verify\_file() method script declined parsing /home/jenkins/workspace/test\_docker\_cloud/hosts as it did not pass its verify\_file() method auto declined parsing /home/jenkins/workspace/test\_docker\_cloud/hosts as it did not pass its verify\_file() method Parsed /home/jenkins/workspace/test\_docker\_cloud/hosts inventory source with ini plugin Skipping callback ‘default’, as we already have a stdout callback. Skipping callback ‘minimal’, as we already have a stdout callback. Skipping callback ‘oneline’, as we already have a stdout callback. META: ran handlers \<192.168.1.10\> ESTABLISH SSH CONNECTION FOR USER: ubuntu \<192.168.1.10\> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ‘User=“ubuntu”’ -o ConnectTimeout=10 -o ControlPath=/home/jenkins/.ansible/cp/d373db3ccc 192.168.1.10 ‘/bin/sh -c ‘"’“‘echo ~ubuntu && sleep 0’”’"‘’ \<192.168.1.10\> (255, ‘’, “Warning: Permanently added ‘192.168.1.10’ (ECDSA) to the list of known hosts.\r\n±±±±±±±±±±±±±+±±±±±±±±±±±±±±±±±+±±±+\n [LINUXVMIMAGES.COM](http://LINUXVMIMAGES.COM)\n±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±+\n User Name: ubuntu\n Password: ubuntu (sudo su -)\n\n _ **OR** _\n\n User Name: linuxvmimages\n Password: [linuxvmimages.com](http://linuxvmimages.com) (sudo su -)\nubuntu@192.168.1.10: Permission denied (publickey,password).\r\n”) prod1 | UNREACHABLE! =\> { “changed”: false, “msg”: “Failed to connect to the host via ssh: Warning: Permanently added ‘192.168.1.10’ (ECDSA) to the list of known hosts.\r\n±±±±±±±±±±±±±+±±±±±±±±±±±±±±±±±+±±±+\n [LINUXVMIMAGES.COM](http://LINUXVMIMAGES.COM)\n±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±+\n User Name: ubuntu\n Password: ubuntu (sudo su -)\n\n _ **OR** _\n\n User Name: linuxvmimages\n Password: [linuxvmimages.com](http://linuxvmimages.com) (sudo su -)\nubuntu@192.168.1.10: Permission denied (publickey,password).”, “unreachable”: true } [Pipeline] }

file hosts:

[prod]  
prod1 ansible\_host=192.168.1.10 ansible\_user=ubuntu

target host : 192.168.1.10, user: ubuntu

from terminal all works right

What is missing ?

---

<div class="post-metadata">

**Author:** ![Fhf\_a](https://avatars.discourse-cdn.com/v4/letter/f/f1d935/32.png) [@Fhf\_a](https://forum.ansible.com/u/Fhf_a)\
**Post date:** [August 5, 2021, 6:43am UTC](https://forum.ansible.com/t/establish-ssh-connection-for-user-ubuntu/35587/2 "2021-08-05T06:43:05Z")

</div>

![Screenshot 2021-08-05 at 09.40.54.png](https://us1.discourse-cdn.com/ansible/original/2X/5/527a1de7c6f204c62ec59b5dbdc34dcfa93aae79.png)

without jenkins pipeline
