I'm trying to forward all requests to a port on a remote server to a port I have opened on my local dev environment at localhost:5000.
I'm using the following command to make this happen, but it keeps failing with a timeout error:
ssh -nNT -R 9001:localhost:5000 root@<server ip> # On another window... curl https://<server ip>:9001/ curl: (7) Failed to connect to <server ip> port 9001: Operation timed out
I have established that
- SSH is running on both client and server
- I can login to localhost using
- I can login to server using
ssh root@<server ip>
- If I
curl localhost:9001from remote server it does not time out. It returns expected response. @RobertRSeattle
- This is the result of
lsof -i :9001on remote server
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME sshd 1425 root 8u IPv4 34175281 0t0 TCP *:9001 (LISTEN) sshd 1425 root 9u IPv6 34175282 0t0 TCP *:9001 (LISTEN)
Can anyone tell me what I'm doing wrong?