View Full Version : Mac OSX Server and SSH and VNC
wyattbiker
Dec 22, 2009, 11:43 AM
I've enabled VNC remoting on my server Snow Leopard
I use the following command to login remotely to 192.168.xxx.nnn:
#ssh 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
Dec 22, 2009, 02:06 PM
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
Dec 22, 2009, 03:31 PM
I've enabled VNC remoting on my server Snow Leopard
I use the following command to login remotely to 192.168.xxx.nnn:
#ssh 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: 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
Dec 22, 2009, 04:49 PM
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
Dec 22, 2009, 05:34 PM
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
Dec 23, 2009, 10:23 AM
'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
Feb 3, 2010, 02:41 PM
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
Feb 4, 2010, 05:35 AM
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
Feb 5, 2010, 11:25 AM
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.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.