[SOLVED] View webpage from server, connected via ssh....
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Apologies for the not so great thread title, but I was unsure as how to shorten my issue to a few words.
Basically, I am at home on a windows box, connecting to a slackware box via ssh, then within that connection I am connecting to another slack box with ssh again, the reason for this is that the the second machine (machine B) is not directly connected to the internet, it uses a proxy via the first box (machine A) to view the outside world. But on machine B are my webpages which I would like to view from home on my windows box (machine C).
Is this possible? My lecturer did something similar I am sure, but I am unable to duplicate it....
Then SSH into Machine B. The machine with the pages you want to view.
Then type:
ssh -N -f -L 1521:localhost:80 username@machineB
Sometimes you can get away with just entering the machine name, or you can login to Machine B first, and then do the above without the last bit. Either way you'll be prompted for a password I believe.
Then, for anyone who's not sure how to view this all on your browser:-
I forwarded Machine B's stuff to IE6, as I use FireFox for proper web browsing. But I would imagine the settings are the same.
tools > internet options > Connections > LAN Settings
Tick "Use a proxy server for your LAN"
Then enter in address "localhost" and port, yep, you guessed it "1521".
Click Advanced, ensure "Use the same proxy for all protocols" is ticked.
A small note, I am unsure if this applies or not, but in the Exceptions section, I removed the localhost entry, so that I could infact view the localhosts main page of Machine A, then Machine B. I don't know if you have to, or if you can enter another address, perhaps an IP. But for my situation I did, and it works. But, if not, just paste it back in!
which would connect me from my laptop/whatever to machineA over SSH whilst also forwarding port 1521 on my laptop to port 80 on machineB. I could then point my browser at http://localhost:1521 to see the web pages on machineB.
To do this in PuTTY:
Set up the SSH connection to machineA in the regular session dialogue window (the default window that PuTTY shows when you run it).
Then click on the little + sign next to SSH in the menu on the left, look for "Tunnels" and click on that to show the Tunnels dialogue.
Put 1521 in the Source Port box
Put machineB:80 in the Destination box (for example 192.168.200.10:80)
Hit Add
Hit open
When the login for machineA appears in PuTTY, give your username and passwd as usual. You can now point your browser at http://localhost:1521 as before.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.