Quote:
|
ssh -t -X -l ricc -R 25901:localhost:5901 some.server.com ssh -l ricc -R 25901:localhost:25901 192.168.2.5
|
First these are two diffrent command and not one command:
Code:
ssh -t -X -l ricc -R 25901:localhost:5901 some.server.com
AND
Code:
ssh -l ricc -R 25901:localhost:25901 192.168.2.5
First command is on your gateway system/router
ssh -t -X -l ricc -R 25901:localhost:5901 some.server.com
-t : Force tty allocation, so that you can see and execute programs on remote system called some.server.com
-X : Enables X11 forwarding
-l ricc : Use this username (ricc) to login on remote system called some.server.com
-R : Port binding 25901:localhost:5901, i.e. means given port on the local client host (25901) is to be forwarded to the given host and port on the remote side (5901). Binding only to localhost, so it will not work by IP or FQDN.
Second command will forward this (above remote) connection to internal host called 192.168.2.5 with ricc as user:
ssh -l ricc -R 25901:localhost:25901 192.168.2.5
All you to do is use port 25901 on 192.168.2.5 to access service provided by server called some.server.com port 5901. Since tcp port 5901 is used by VNC server, use vnc client on your system, put hostname localhost, port 5901 and your usermame/password and you should have remote server display securely
So all it does it:
Code:
Remotebox -> Router -> Your system
With VNC client connects to localhost port 5901
VNC
SERVER
In otherwords you are bypassing firewall and setting up tunnel to get remote x server display on local system.
I hope this helps, if you have more question feel free to reply back