Score:0

SSH tunnel over multi hops using putty (two hops)

za flag

I have these config: Host with putty -- > Gateway A (port 22 open) --> FinalMachine (port 22 with gateway A open and port 18080 with apache).

Like I don't have communication from Host with putty with FinalMachine I would like to tunneling the connection to can connect directly from Host to 18080 of FinalMachine.

I'm trying to do with putty but I can't find the solution. Anyone could help me please? Thanks!

Score:0
in flag

Method 1, using 2 instances of putty

  • Putty 1: Local forward 20022:GatewayB:22, Connect to GatewayA
  • Putty 2: Local forward 18080:FinalMachine:18080, Connect to localhost:20022

Method 2:

  • Putty Local forward 18080:127.0.0.1:18080,
    • From within session do next step ssh -L 18080:FinalMachine:18080 GatewayB
za flag
Sorry the Method 1 I can't understand. What is GatewayB??? Thanks
za flag
Problem is mine in the question redaction GatewayB is FinalMachine. I've edited the main question
in flag
Since you used "multi hops" and mentioned Gateway B I assumed there actually was a B machine. As long as `Gateway A` can access `FinalMachine:18080` you only need that one forward when connecting to `A`. On the other hand if `18080` is only accessible from `FinalMachine` itself, then use above, replace `B` with `Final` and possible change to localhost.
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.