This is the scenario
You want to connect to a remote server's webserver (port 80), but you only have permission to SSH to that server. Do the following:
ssh -L 8080:localhost:80 remote_server
Now you can point your browser to hhtp://localhost:8080 and view remote server's port 80
localhost is relevant to the remote_server
Also, you can do
ssh -L 8080:remote_server_2:80 remote_server_1
Now if you point your browser to http://localhost:8080 you will connect remote_server_2 port 80. The connection will go through remote_server_1 and remote_server_2 will identify remote_server_1 as the source of the request.
This way you can view a web server of a system even though you cannot connect to it directly. Of course remote_server_1 must be able to connect to remote_server_2 at port 80.
You can also use Putty to enable port forwarding. Go to Connection-->SSh-->Tunnels and set the required options.
Thursday, October 14, 2010
Display remote X applications to your desktop
The easiest thing you can do is to SSH to the remote server activating the X11 forwarding.
ssh -X remote_server
From now on anything you execute on the remote server appears on your desktop
ssh -X remote_server
From now on anything you execute on the remote server appears on your desktop
SOCKS proxy with SSH
From your PC give
ssh -D XXXX Proxy_GW_IP
To your browser or any client that supports SOCKS set Proxy_GW_IP as your proxy server and use port XXXX.
Now you can browse the internet as if you were the Proxy_GW
ssh -D XXXX Proxy_GW_IP
To your browser or any client that supports SOCKS set Proxy_GW_IP as your proxy server and use port XXXX.
Now you can browse the internet as if you were the Proxy_GW
Subscribe to:
Posts (Atom)