For a project I've to access a localhost apache server of a computer (host_C) from my computer (host_A) via another computer (host_B) all with ssh.
I've already succeeded to connect to host_C with host_A via host_B using :
ssh username_host_C@host_C
with this in my .ssh/config
file :
Host host_C
ProxyCommand ssh username_host_B@host_B -W %h:%p
So I tried to do a ssh tunnel to access the local webserver of host_C in my browser at address http://localhost:8080 with this command :
ssh -L 8080:host_C:80 username_host_B@host_B -N
When I connect to http://localhost:8080/ it doesn't work and says in terminal :
debug1: Connection to port 8080 forwarding to host_C port 80 requested.
debug1: channel 4: new [direct-tcpip]