I'd like to setup three hosts:
- HostC - destination host. You can login to it as
ssh UserC@HostC
with private key. - HostB - "ambassador/proxy" for HostC. When you ssh to HostB (simply as
ssh UserB@B
with UserB private key, without any additional actions like ProxyCommand in the config), it should be full equivalent of sshing directly to HostC. Of course, HostB has private key needed to connect to HostC. I have full control over HostB itself. - HostA - host, from which we want to run
ssh UserB@HostB
and - via HostB - connect to destination HostC without even knowing beforehand about HostC.
There's almost the same questions here:
SSH from A through B to C, using private key on B
However, accepted answer there is to use ProxyCommand. This requires configuration on HostA, which is not desirable in my case.
Is such scenario at all possible? Thanks!