Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSH port forwarding not working for websocket

I'm running a web service on serverA:8890, this includes the regular HTTP service and websocket services. I'm trying to set up the SSH port forwarding from serverB to serverA, so I can access the ServerA's service through SSH tunnel.

Here is my command:

ssh -f user@serverA -i user.pem -L 2000:serverB:8890 -N

When I connect to ServerB:2000, I can see all the regular web services, but the websocket part is not working.

Any idea how to solve this?

Thanks

like image 329
user3926003 Avatar asked Feb 13 '23 07:02

user3926003


1 Answers

I believe your tunnel needs to be:

ssh -f user@serverA -i user.pem -L 2000:serverA:8890 -N
like image 51
Greg Bell Avatar answered Mar 07 '23 20:03

Greg Bell