# Use same username used for ansible to log onto bastion in AWX

**URL:** <https://forum.ansible.com/t/use-same-username-used-for-ansible-to-log-onto-bastion-in-awx/6151>\
**Category:** Get Help\
**Tags:** awx\
**Created:** [June 4, 2024, 7:03am UTC](https://forum.ansible.com/t/use-same-username-used-for-ansible-to-log-onto-bastion-in-awx/6151 "2024-06-04T07:03:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eranga\_Wickramasingh](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/eranga_wickramasingh/32/3649_2.png) [@Eranga\_Wickramasingh](https://forum.ansible.com/u/Eranga_Wickramasingh)\
**Post date:** [June 4, 2024, 7:03am UTC](https://forum.ansible.com/t/use-same-username-used-for-ansible-to-log-onto-bastion-in-awx/6151/1 "2024-06-04T07:03:12Z")

</div>

We are planning to use AWX in our environment. At the moment we have individual users running playbooks. We cannot have a shared user. We also have bastion servers to get into our environments. We need to use the same username from the machine credential to log in to the bastion. I tried using ansible\_user variable in “ansible\_ssh\_common\_args” but it is undefined. Is there a way to achieve this

---

<div class="post-metadata">

**Author:** ![alainseys](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/alainseys/32/2757_2.png) [@alainseys](https://forum.ansible.com/u/alainseys)\
**Post date:** [June 4, 2024, 2:11pm UTC](https://forum.ansible.com/t/use-same-username-used-for-ansible-to-log-onto-bastion-in-awx/6151/2 "2024-06-04T14:11:12Z")

</div>

i can recomend you use a vault.yml file that contains the credentials so you only need to have 1 credential shared with your team.

The vault file you should have in something like an internal repo with some ssh keys to fetch them.

---

<div class="post-metadata">

**Author:** ![fosterseth](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/fosterseth/32/101_2.png) [@fosterseth](https://forum.ansible.com/u/fosterseth)\
**Post date:** [June 5, 2024, 6:37pm UTC](https://forum.ansible.com/t/use-same-username-used-for-ansible-to-log-onto-bastion-in-awx/6151/3 "2024-06-05T18:37:50Z")

</div>

you can define an ssh machine credential with a static username/password and attach this to your Job. This credential will be used for all users who launch the job

Seth
