# jumphost sudo su AND remote sudo su

**URL:** <https://forum.ansible.com/t/jumphost-sudo-su-and-remote-sudo-su/16694>\
**Category:** Ansible Project\
**Created:** [November 4, 2014, 10:13pm UTC](https://forum.ansible.com/t/jumphost-sudo-su-and-remote-sudo-su/16694 "2014-11-04T22:13:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phil\_Taylor](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@Phil\_Taylor](https://forum.ansible.com/u/Phil_Taylor)\
**Post date:** [November 4, 2014, 10:13pm UTC](https://forum.ansible.com/t/jumphost-sudo-su-and-remote-sudo-su/16694/1 "2014-11-04T22:13:18Z")

</div>

Hi everyone, I’m new here and to ansible so please be gentle 😉

I have a situation where to access the remote ansible host/s via SSH I need to:

1. have my public key on the jumphost as my user acct (A)

2. sudo su on jumphost to another account (B)

3. ssh to the remote as (B) using another key (so far, so normal, I hear you say)

4. then sudo su to **another** account (C) to gain access  
I have accomplished this so far by dint of:

5. ProxyCommand in .ssh/config with -t for sudo su -l (B)

6. copying user (B) private key to source host

7. -t on the command line for final sudo su (C)

What I need to know is:

1. is there a cleaner way in SSH
2. assuming 1. what Ansible _user_ setup is required  
Obviously none of this would be required if ansible was installed on the jumphost but that won’t happen

TIA, Phil
