I am running a web server that exposes a website locally on the client machine at dev.local.company.com:3888
and I want to access that website on a separate machine on the local network over ssh. Both computers are macOS and the dev.local.company.com domain is equivalent to localhost.
So I ran ssh -L 3888:dev.local.company.com:4000 connors-mbp
to attempt to forward dev.local.company content at port 3888 to be viewable on the remote at port 4000. This works and logs into the remote. But when I attempt to start the web server, it displays an error saying port 3888 is already in use and says it is in use by SSH itself.
Why would SSH be "running" on that port if it is supposed to be forwarding it? Error is shown below.
? Something is already running on port 3888. Probably:
ssh -L 3888:dev.local.company.com:3000 Connors-MBP-3 (pid 38536)
in /Users/connor
Running in reverse order, server open first then attempt to run ssh -L
, ssh shows an error saying that port is already in use by the server. Error from this alternative order shown below.
bind [127.0.0.1]:3888: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 3888