jumphost sudo su AND remote sudo su

67 views
Skip to first unread message

Phil Taylor

unread,
Nov 4, 2014, 5:13:19 PM11/4/14
to ansible...@googlegroups.com
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:
  1. ProxyCommand in .ssh/config with -t for sudo su -l (B)
  2. copying user (B) private key to source host
  3. -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
Reply all
Reply to author
Forward
0 new messages