我正在尝试通过Bastion EC2实例来扩展ActiveDirectory/PAM用户
如果我尝试使用AD/PAM凭据登录“每台服务器”,即登录到Bastion主机,我可以登录。然后,我可以从Bastion主机使用我的AD/PAM用户登录到EC2。所以这没什么问题。
Step1:ssh user@example.com@bastion.example.com -我可以登录到Bastion
Step2:ssh user@example.com -h 1.2.3.4 -我可以在IP 1.2.3.4上登录到EC2
现在我想使用ProxyJump,但是当我检查日志时,用户和/或域和/或bastion.example.com (如果格式错误/不正确)。因此,据我所知,我应该能够做这样的事情:
ssh -J user@example.com@bastion.example.com user@example.com 1.2.3.4我从Bastion主机获得以下连接:debug1: Setting implicit ProxyCommand from ProxyJump: ssh -l user -v -W '[%h]:%p' example.com@bastion.example.com
debug1: Executing proxy command: exec ssh -l user -v -W '[example.com]:22' example.com@bastion.example.com
Authenticating to bastion.example.com:22 as 'example.com'
我已经尝试过-l开关,并删除了-J,它通过了正确的,但失去了ProxyJump功能。
ssh -v -l user@example.com bastion.example.com user@example.com 1.2.3.4
debug1: Authenticating to bastion.example.com:22 as 'user@example.com'
这是正确的..。
有什么建议吗?如何使用AD凭据将ProxyJump转换为Basion主机?我需要在什么地方逃跑吗?
发布于 2022-02-09 12:50:47
我不得不使用下面的ProxyCommand来工作
ssh -v -o ProxyCommand="ssh -v -l user@example.com -W %h:%p bastion.example.com" user@example.com@1.2.3.5
https://serverfault.com/questions/1093149
复制相似问题