익명 05:09

How to ping remote host with jump

How to ping remote host with jump

suppose that I have this situation:

Layout with three machines: "host", "jumphost", "server", machines are only connected through "jumphost"

How can I from host ping Server? Important information is that, Server is visible only for JumpHost. host and Server are Linux-based, but JumpHost is a Windows, and I would like to avoid scripting on the Windows platform.



Top Answer/Comment:

Just pass the command as an argument. e.g. Let's say your jump server is JUMP and the remote host is HOST. Just do:

ssh JUMP "ping -c 1 HOST"

In the format:

ssh <USER>@<JUMP_SERVER> <CMD>
상단 광고의 [X] 버튼을 누르면 내용이 보입니다