I am learning how to do SSH remote forwarding and I am trying to practice that using two virtual machines on my computer. One is runs Kali and hosts an apache web server configured to listen on port 8000 and the other runs Manjaro and should act as the remote device. (I have set the network adapters to "Bridged mode" in VB). When I run the command:
ssh -R 8080:localhost:8000 [email protected]
It returns the following output:
[email protected]'s password:
Last login: Sat Jul 30 16:09:45 2022 from 192.168.3.120
[manjaro@manjaro ~]$ connect_to localhost port 8000: failed.
connect_to localhost port 8000: failed.
connect_to localhost port 8000: failed.
connect_to localhost port 8000: failed.
It prints out the "failed to connect" line every time I insert: http://localhost:8080/
into the web browser on the Manjaro VM
What can the problem be?
curl localhost:8000
on the server?ssh
ing from (192.168.3.120?), and which one are youssh
ing into (192.168.3.126)?curl localhost:8080
is this:pastebin.com/ypA2cbNZcurl localhost:8000
but you testedcurl localhost:8080
. Didn't the discrepancy make you wonder? See my answer.