I have one hop between my local machine and the machine I want to access some remote port. I am trying following thing. But doesn't seem to work.
From remote machine, I want port 9443 to open on my local machine. The port 9443 is already being used by
local_machine --> hop --> remote_machine
- Login to hop machine and run following command
ssh -N gshah03@remote_machine -L 8080:localhost:9443 -4
- Now from my local machine. issue following command.
ssh -N gshah03@hop-L 9443:localhost:8080
However, on first step I am getting following error.
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Connection to port 8080 forwarding to 127.0.0.1 port 9443 requested.
debug1: channel 1: new [direct-tcpip]
channel 1: open failed: connect failed: Connection refused
debug1: channel 1: free: direct-tcpip: listening port 8080 for 127.0.0.1 port 9443, connect from 127.0.0.1 port 33558 to 127.0.0.1 port 8080, nchannels 2
debug1: Connection to port 8080 forwarding to 127.0.0.1 port 9443 requested.
debug1: channel 1: new [direct-tcpip]
channel 1: open failed: connect failed: Connection refused
debug1: channel 1: free: direct-tcpip: listening port 8080 for 127.0.0.1 port 9443, connect from 127.0.0.1 port 33562 to 127.0.0.1 port 8080, nchannels 2