The Following User Says Thank You to jldiaz For This Useful Post: | ||
![]() |
2008-04-07
, 18:47
|
|
Posts: 4,930 |
Thanked: 2,272 times |
Joined on Oct 2007
|
#22
|
Okay, since everyone has been helpful I feel like I must come clean about one really dumb mistake I made. The reason I couldn't find x11vnc in xterm was simply because I didn't really understand how to change directories. I was working under the (wrong) assumption that if I was in root (/) I could cd to /usr, and then once in /usr I could simply enter "cd /bin", expecting that to drop me into cd/usr/bin.
Now I realize that was totally wrong. Of course telling xterm to cd /bin, it's going to change the directory to /bin. I'm sure there must be a way to cd [current dir]/[desired dir] without having to enter the full path. I just don't know what it is yet.
cd /usr cd bin
cd .
cd ../share
So when I was setting up the SSH before, I was doing so as so:
ssh -L5901:localhost:5900 [name]@[XP.server's.actual.IP]
ssh -Llocalport:forwardhost:forwardport user@remotehost
ssh -Llocalport:insecure.host.lan:forwardport DMZlogin@NAT's.WAN.side.IP
ssh -L5901:127.0.0.1:5900 XP_username@NAT's.WAN.side.IP
It appears that my VNC session (nokia client to XP server) was not going through the SSH. Is this correct? In order to send the VNC through the SSH, I need to specify the an IP of 127.0.0.1:1?
servername:display or port
@!/bin/sh ssh -f -L5901:127.0.0.1:5900 XP_username@NAT's.WAN.side.IP sleep 10 exec vncviewer 127.0.0.1:5901
![]() |
2008-04-07
, 18:56
|
|
Posts: 100 |
Thanked: 13 times |
Joined on Mar 2008
|
#23
|
When you tell to the nokia VNC client to connect to MACHINE:N, it tries to connect to port 5900+N on the specified machine. So, if you put as host your.windows.box.ip:0, it will try to connect to port 5900 of your.windows.box.ip. This connection is "straight" (it does not use the ssh tunnel at all), and it is unencrypted. Moreover, it will be rejected if in the VNC server side you specified the option -localhost (which only allows connections coming from the own windows box).
When you specify the host 127.0.0.1:1 (or localhost:1 which is the same), the VNC client will try to connect with port 5901 of localhos, i.e. of the nokia.
The Following User Says Thank You to cmdowns For This Useful Post: | ||
![]() |
2008-04-07
, 19:10
|
|
Posts: 100 |
Thanked: 13 times |
Joined on Mar 2008
|
#24
|
I can't believe I'm still unclear about this.
From this explanation:
It sounds like the proper way to enter the command is as so:
ssh -L5901:localhost:5900 [name]@127.0.0.1:1
What I'm confused about (well one of the things I'm confused about) is, how does my nokia find the XP box without specifying the XP box's IP?
![]() |
2008-04-07
, 23:38
|
|
Posts: 48 |
Thanked: 40 times |
Joined on Apr 2008
@ Spain
|
#25
|
![]() |
2008-04-08
, 14:52
|
|
Posts: 100 |
Thanked: 13 times |
Joined on Mar 2008
|
#26
|
![]() |
2008-04-08
, 16:59
|
|
Posts: 90 |
Thanked: 5 times |
Joined on Dec 2007
|
#27
|
![]() |
2008-04-09
, 02:54
|
|
Posts: 100 |
Thanked: 13 times |
Joined on Mar 2008
|
#28
|
That's why this is so complicated; each port forwarding involves 4 machines.
![]() |
2008-04-09
, 03:26
|
|
Posts: 4,930 |
Thanked: 2,272 times |
Joined on Oct 2007
|
#29
|
Thanks again to everyone for contributing to this thread. I'm learning a lot.
Okay, what jldiaz wrote really has started to make all this info come together for me. It particularly clarifies what Benson meant when he said
<stuff that vaguely made sense as I skimmed it quite hastily>
Finally, I think I understand this.
But for some reason I can't make it work.
I can set up the ssh session. xterm takes the command, and then prompts me with the CLI prompt appropriate for the Cygwin terminal. It really seems like the session is set up appropriately.
But VNC won't do anything with 127.0.0.1:1
I can connect to the XP box's VNC server directly at my.XP.box's.IP.address But that's not what we're shooting for.
If my ssh client is listening to the VNC client on 5901, then it should be able to send the VNC info through port 22 to the sshd server which can send it through port 5900 to the VNC server.
Could this be a problem with my router? I've tried setting up port forwarding, but I can't make anything work. But that doesn't seem right. If I can connect the ssh between the nokia and the XP box on port 22, and I can connect the VNC between the nokia and the XP box on port 5901, then how could the router interfere with the nokia's port 5900 ability to talk to the nokia's port 22 to talk to the xp box's port 22 which finally sends it to the XP box's 5900.
And if I can connect to the VNC server, directly, and insecurely, does that mean that any damn computer on the internet with a VNC client can connect to my XP box directly and insecurely? Or does it just work for me because I my nokia and XP box happen to be on the same wlan.
The Following User Says Thank You to Benson For This Useful Post: | ||
![]() |
2008-04-09
, 09:51
|
|
Posts: 48 |
Thanked: 40 times |
Joined on Apr 2008
@ Spain
|
#30
|
If I'm getting this right (and there's probably at least 50 50 odds), then jldiaz's diagram clearly illustrates the four machines.
And if I can connect to the VNC server, directly, and insecurely, does that mean that any damn computer on the internet with a VNC client can connect to my XP box directly and insecurely? Or does it just work for me because I my nokia and XP box happen to be on the same wlan.
The Following User Says Thank You to jldiaz For This Useful Post: | ||
When you specify the host 127.0.0.1:1 (or localhost:1 which is the same), the VNC client will try to connect with port 5901 of localhos, i.e. of the nokia.
--ル Diaz