Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

wyattbiker

macrumors member
Original poster
Mar 7, 2009
42
4
I've enabled VNC remoting on my server Snow Leopard

I use the following command to login remotely to 192.168.xxx.nnn:

#ssh http://www.myremoteserver.com -l myusername

which works fine but when I try to use VNC to view the desktop, it fails to connect. I installed Chicken of the VNC. Internally this works fine. I have all standard ports.

Any ideas?

Thanks
 

TheCoupe

macrumors member
Mar 4, 2009
53
0
Northern Ireland
The reason, I believe, that this won't work, is because you aren't specifying the port number for which you are creating the secure tunnel in on, so in theory, you are simply creating a single secure tunnel in on port 22.

If you are using Snow Leopard Server, why not simply create a VPN, that way, once you're connected, you'd have full access to everything you need.
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
I've enabled VNC remoting on my server Snow Leopard

I use the following command to login remotely to 192.168.xxx.nnn:

#ssh http://www.myremoteserver.com -l myusername

which works fine but when I try to use VNC to view the desktop, it fails to connect. I installed Chicken of the VNC. Internally this works fine. I have all standard ports.

Any ideas?

Thanks

Yes, use:
Code:
 ssh -L localhost:5900:<internal IP of host you want to connect to>:5900 <username>@<public IP or domain>

Then when you fire up the VNC client, type localhost. Also note that some VNC servers and clients require this to be enabled for it to accept localhost.

If you are using Snow Leopard Server, why not simply create a VPN, that way, once you're connected, you'd have full access to everything you need.

Depending on what network you connect to, outbound VPN may not be an option. Using SSH only gives you greater flexibility.
 

Alrescha

macrumors 68020
Jan 1, 2008
2,156
317
I installed Chicken of the VNC.

In addition, there's no need for Chicken of the VNC. You can use 'open vnc://hostname: <port> in Terminal to bring up Screen Sharing.

A.

ps: there's no space between the colon and portnumber, it's there only to avoid a smiley.
 

wyattbiker

macrumors member
Original poster
Mar 7, 2009
42
4
In addition, there's no need for Chicken of the VNC. You can use 'open vnc://hostname: <port> in Terminal to bring up Screen Sharing.

A.

ps: there's no space between the colon and portnumber, it's there only to avoid a smiley.

Worked like a charm with Chicken using localhost, but the 'open vnc://hostname:5900' brings up a message on the server screen saying that a screen cannot share itself or something to that effect.
 

Alrescha

macrumors 68020
Jan 1, 2008
2,156
317
'open vnc://hostname:5900' brings up a message on the server screen saying that a screen cannot share itself or something to that effect.

It is true that 'localhost:5900' is a special case. If you are using ssh as described by belvdr, I would suggest a different local port anyway, as you will have a conflict if you ever turn on screen sharing locally.

A.
 

warnerl

macrumors newbie
Feb 3, 2010
2
0
My workaround

The target computer must have file sharing selected, and the user name that you intend to use added. You can find this under system preferences > sharing > (then select which folder you want to share)

Larry Warner
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
The target computer must have file sharing selected, and the user name that you intend to use added. You can find this under system preferences > sharing > (then select which folder you want to share)

Larry Warner

So enabling file sharing allowed vnc to connect to localhost?
 

Serif

macrumors regular
Jul 10, 2008
139
17
UK
You can run into problems if you also have screen sharing enabled on the machine you are running the vnc client on. To avoid this use a port number other than 5900 for the localhost port of the ssh command. For instance:

ssh -L localhost:6900:<internal IP of host you want to connect to>:5900 <username>@<public IP or domain>

Then you should be able to connect to the remote machine as vnc://localhost:6900

I find an application like SSH Tunnel Manager to be useful in automatically starting and maintaining ssh connections if you tend to use them regularly. If you look around someone has compiled the latest version for Intel.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.