问题原文
原帖链接 · Urjit · CC BY-SA 3.0
I have the following situation:
DevMachine (D) need to connect to a gateway/bastion server (G)
and then be able to talk to another server serving RabbitMQ (R) traffic on port 5672.
I tried using an ssh tunnel to the gateway: ssh -L 5672:localhost:5672 G and next I want the gateway instance to let me connect to R's 5672. How do I accomplish that? I feel like I am missing a step here.
What I want: D ->G -> R. What I am getting is D ->G. If I had a rabbitmq instance running locally on G - this works but what I want is to essentially use G as a VPN.
Thanks!
已采纳解答
原帖链接 · Jakuje · CC BY-SA 3.0
If you want to connect to remote host, you need to use its name, not the localhost:
ssh -L 5672:R:5672 G
in this way, you should be able to access host R on localhost:5672.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
