I am trying to use local port forwarding to access remote host over a firewall and am able to do so using the command below.
ssh -L 23456:remotehost:10000 localhost
>telnet localhost 23456
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
>telnet 170.19.120.207 23456
Trying 170.19.120.207...
telnet: connect to address 170.19.120.207: Connection refused
telnet: Unable to connect to remote host: Connection refused
Looks like portforwarding is happening on loopback and anything with the hostname is getting rejected. Can someone help me to get around this, as I am sure there is/should be a way