GCIH · Question #747
What is the destination endpoint host for the SSH session shown below? ssh - L 1777:192.168.1.80:23 [email protected]
The correct answer is C. 192.168.1.80 port 23. In SSH local port forwarding, the -L flag syntax is local_port:destination_host:destination_port, so the final destination is the host and port after the colon separator following the local port.
Question
What is the destination endpoint host for the SSH session shown below? ssh - L 1777:192.168.1.80:23 [email protected]
Options
- A192.168.1.80 port 1777
- B192.168.1.70 port 1777
- C192.168.1.80 port 23
- D192.168.1.70 port 23
How the community answered
(16 responses)- A6% (1)
- B6% (1)
- C75% (12)
- D13% (2)
Why each option
In SSH local port forwarding, the -L flag syntax is local_port:destination_host:destination_port, so the final destination is the host and port after the colon separator following the local port.
Port 1777 is the local listening port on the client machine, not the destination port on the remote endpoint; 192.168.1.80 is correct but port 1777 is not the destination port.
192.168.1.70 is the SSH jump/relay server (the host zmckracken authenticates to), not the final destination endpoint of the tunnel.
The command 'ssh -L 1777:192.168.1.80:23' creates a local tunnel where connections to local port 1777 are forwarded through the SSH server (192.168.1.70) to the destination endpoint 192.168.1.80 on port 23. Port 23 is Telnet, and 192.168.1.80 is the ultimate target host that receives the forwarded traffic.
192.168.1.70 is the SSH server used as the tunnel relay, not the destination endpoint; the traffic is forwarded onward to 192.168.1.80:23.
Concept tested: SSH local port forwarding -L flag syntax and tunnel destination
Source: https://www.ssh.com/academy/ssh/tunneling/example
Topics
Community Discussion
No community discussion yet for this question.