View webpage from server, connected via ssh....
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.... Any help would be greatly appreciated. Thanks in advance. |
You can use vlc, or use X over sh
http://www.vanemery.com/Linux/XoverSSH/X-over-SSH2.html http://www.cyberciti.biz/faq/linux-u...rely-over-ssh/ |
Im using putty at the moment, and I am not really worried about a GUI, I'd just like to be able to view the pages that machine B is serving.
|
If you don't want a GUI, use lynx, text-only Web browser
http://en.wikipedia.org/wiki/Lynx_%28web_browser%29 It should be installed by default. |
Sorry, I am terrible at explaining, I mean view the pages from machine B, on machine C's (My PC) web browser... I thought you meant the Linux OS GUI.
|
No worries, I found a solution:-
In putty, enter in the tunneling section source port: 1521 destination: localhost:1521 This will forward Machine A's pages. 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! |
In Linux I would do it like this:
Code:
ssh user@machineA -L 1521:machineB:80 To do this in PuTTY:
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. I have a short tutorial on it with screenshots at: http://loganslab.logspark.com/?p=4 |
All times are GMT -5. The time now is 11:59 PM. |