Score:0

Unable to ssh ProxyJump AD / PAM user to jumpbox / bastion host

cn flag

I'm trying to ProxyJump an ActiveDirectory/PAM user via a Bastion Host to AWS EC2 instance

If I try to login "per-server" i.e. log in to Bastion Host with AD/PAM credentials I can login. From the Bastion Host I can then use my AD/PAM user to login to the EC2. So there isn't an issue on this.

Step1: ssh [email protected]@bastion.example.com - I can login to the Bastion

Step2: ssh [email protected] -h 1.2.3.4 - I can login to the EC2 at IP 1.2.3.4

Now I want to use ProxyJump but the user and/or domain and/or bastion.example.com if malformed / incorrect when I check logs. So from what I can gather, I should be able to do something like:

ssh -J [email protected]@bastion.example.com [email protected] 1.2.3.4

From the Bastion Host I get following connection: debug1: Setting implicit ProxyCommand from ProxyJump: ssh -l user -v -W '[%h]:%p' [email protected]

debug1: Executing proxy command: exec ssh -l user -v -W '[example.com]:22' [email protected]

Authenticating to bastion.example.com:22 as 'example.com'

I have tried -l switch and removed -J which come through correct but lose the ProxyJump feature

ssh -v -l [email protected] bastion.example.com [email protected] 1.2.3.4

debug1: Authenticating to bastion.example.com:22 as '[email protected]'

Which is correct..

Any advice how I can ssh ProxyJump into a Basion Host with AD credentials? Do I need escapes in the command somewhere?

Score:0
cn flag

I've had to resort to using following ProxyCommand which works

ssh -v -o ProxyCommand="ssh -v -l [email protected] -W %h:%p bastion.example.com" [email protected]@1.2.3.5

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.