Can't connect to Mini using vnc

So, i've got my early '08 mac mini set up using osx's server client and connected to the internet. i'm using chicken of the VNC on my ibook and everything was working but then stopped a couple days ago. the vnc program keeps saying that the server is closing the connection.

i've tried:
restarting both machines
a different server program
a different client program
changing the password to access VNC
turning off my firewall
connecting from the actual IP address instead of the 10.0.1.2 (localhost)
Changing the port it connects from 5900 to various others

all of these have not changed the outcome, is there something i'm doing wrong? what other steps should i take? as i said before it WAS working a few days ago so i know both computers are capable.

Mac Mini 1.86Ghz, Mac OS X (10.5.6), 1GB ram --ibook G4 1.07Ghz PPC 256MB RAM OS X 10.3.9

Posted on Apr 28, 2009 5:54 AM

Reply
11 replies

Apr 28, 2009 6:54 AM in response to Cort...

Your no fun. You have tried everything 🙂

While experimenting, I would suggest leaving the firewall off. You can turn it on later if it was not the problem. But having it on during experiments can just confuse things.

Have you tried connecting from the Mac mini to the Mac mini (localhost). While this can get ugly (infinite windows decending into the dephts of who knows what), it is a diagnostic tool.

While NOT a solution, have you tried using the Vine Server (aka OSXvnc) on the Mac mini (using a different port from what the built-in Mac OS X VNC server is using). This is both an experiment, and maybe a way to get you working while you figure out what is wrong with the build-in VNC server.

Have you messed the Remote Management "Allow Access" fields?

You have double checked the Remote Management "Computer Settings" check boxes (assuming you have since you said you changed the password)?

Have you messed with the Remote Management "Options"?

If the Mac mini to Mac mini VNC connection works, can you try tunneling your VNC connection over ssh

ssh -L5922:localhost:5900 username@Mac.mini.address

Oh yea, you will need to enable Remote Login sharing on the Mac mini.

Now tell Chicken of the VNC (or other VNC client) to connect to

localhost:5922

This will send your request to the local side of the ssh tunnel, which will wisk it over to the Mac mini and deliver it to the Mac mini's port 5900.

Apr 28, 2009 7:45 PM in response to BobHarris

lol i don't like to post here unless i've exhausted all of my options and then i usually read like 50 threads before i do post....

okay, so, i was able to get to the mac mini from the mac mini and did get the infinite windows. (firewall is off)

i allow access to anyone who has the correct password in remote management, i DID check and double check the "computer settings" and the "options" are all checked

okay now i'm not exactly sure how i would go about doing the ssh, i have never worked with it because the vnc was more than enough. what would i put that into? terminal? and i know my username, but what address did you want me to use? IP or MAC address? oh and remote login is already enabled.

OH and about that last little bit. if, for some reason, i wasn't in range of my mac mini could i use its IP address:5922 instead of localhost:5922?

Apr 28, 2009 8:10 PM in response to Cort...

okay so i've been fiddling with it and i may have answered some of my questions... i went into terminal, and set up the ssh thingy and it said something like, xx.xx.xx.xx was added to the list of secure servers. then i went to CotVNC and changed the port from 5900 to 5922, but now it's saying the connection was refused. did i do something wrong?

i tried connecting from the MM to the MM using port 5922 and the connection was refused just like it was on my ibook. but when i connect from the MM to the MM using the standard 5900 it still works....

Apr 29, 2009 6:29 AM in response to Cort...

i went into terminal, and set up the ssh thingy and it said something like, xx.xx.xx.xx was added to the list of secure servers.

That is expected. And I'm assuming ssh made the connection, so the -L 5922:localhost:5900 has created a tunnel between ports localhost:5922 and remote host's port 5900.
then i went to CotVNC and changed the port from 5900 to 5922, but now it's saying the connection was refused. did i do something wrong?

So far I do not think so. When you changed the CotVNC port did you also change the system address to "localhost"?

When you ran CotVNC, was it on the system where you also ran the ssh command? The idea is that ssh creates a tunnel from the system where you want to run CotVNC to the remote system (your Mac mini) where the VNC server is running.

If you did all the right things, then it should have accepted your connection unless the VNC server is refusing connections for some reason.

HOWEVER, the fact that you were able to to Mac mini to Mac mini (infinite screens), is a strong indication that the VNC server and VNC password are setup correctly, and that your problem is going over the network from your iBook to your Mac mini.

My suggestion to use ssh from the iBook to the Mac mini would make the Mac mini think the VNC connection was really local, as the ssh tunnel does not look like a remote connect to port 5900.
i tried connecting from the MM to the MM using port 5922 and the connection was refused just like it was on my ibook.

That would only work if you issued a separate ssh command from the Mac mini to yourself on the Mac mini. The ssh command you issued on the iBook only creates a tunnel from the iBook to the Mac mini. Think of the ssh tunnel like a phone call to your parents. Once you dial the number, you can not put your phone down and walk over to your neighbor's expecting to be able to pick up their phone and continue your converstation. But you can go upstairs to an extension phone and continue the same call. This ssh making the call (tunnel), and CotVNC using the establish call (port 5922).
but when i connect from the MM to the MM using the standard 5900 it still works....

That is still good news. It is a strong indication that your problems are network related.
if, for some reason, i wasn't in range of my mac mini could i use its IP address:5922 instead of localhost:5922?

No, BUT you are having good thoughts. An ssh tunnel can be created across the internet (and it is a secure encrypted connection) if you have configured your router for port forwarding ssh and obtained a free dynamic DNS name from DynDNS.org or No-IP.com.

Setting you your ssh tunnel would be similar to establishing it locally, only you would specify your dynamic DNS name (again assuming ssh had been properly port forwarded on your router). Now you would just have a longer tunnel, but CotVNC is still going to enter the localhost end of the tunnel and ssh is going to wisk your request to your Mac mini's port 5900

ssh -L 5922:localhost:5900 dynamic.dns.name.of.Mac.mini
# CotVNC still uses localhost:5922

The choice of 5922 is any value you want. I choose 5922 because port 22 is the ssh port, so I just merged 5900 and 22. You could chose 43917 if you wanted to or any other high numbered random value less than 65535.

Apr 29, 2009 6:34 AM in response to Cort...

NOTE: The fact that you could do Mac mini to Mac mini (infinite screens) connection is a strong indication that you are being rejected on the network connection and that your VNC server and VNC password are fine.

X_console's suggestion of checking your system logs is an very good idea.

While I think ssh is a great way to make VNC connections across the internet, you should really be able to make local connections without the need for ssh. I was just suggesting ssh as a diagnostic approach.

So do not get side tracked with ssh when you really need to be focused on why your Mac mini is rejecting network VNC connection.

Apr 29, 2009 7:02 AM in response to X_console

@bob
NOW I SEE!!! i established the ssh tunnel from mac mini to mac mini. working on fixing that now.

@console

yes i did check the logs, and each time i tried to connect from my ibook to the MM, it said connection accepted or something like that, i can't remember...

and lol no i don't even have a clue what those programs are...

OH and another piece of info for all:
i'm currently at ASU in the dorms so i don't have a personal router and i DEFINITELY don't have access to their routers...

Apr 29, 2009 7:45 AM in response to Cort...

i'm currently at ASU in the dorms so i don't have a personal router and i DEFINITELY don't have access to their routers...

That might have something to do with things. It can also complicate things if you want to do remote connections.
okay i established ssh tunnel from ibook to MM. i went into CotVNC and was able to connect. sort of. it didn't terminate the connection but all i got was a gray screen...

That is progress.

Check your CotVNC settings. The Mac OS X VNC server can sometimes get picky. Set your CotVNC color depth to match your Mac mini screen color density (8 bit (256 colors), 16 bit (thousands of colors), 24 bit (millions of colors)). Make sure all the encodings in Connection profiles are checked.

If you have another VNC client that will run on your iBook, give that a try. Does JollysFastVNC run on your iBook (not sure if it supports your iBook's version of Mac OS X).

Apr 29, 2009 7:48 AM in response to Cort...

i'm currently at ASU in the dorms so i don't have a personal router and i DEFINITELY don't have access to their routers...

And connecting from outside will only work if ASU gives your Mac mini a public IP address, and ASU does not inpose a campus firewall of its own between you and the internet in general.

If ASU does give you private IP addresses or it has a campus firewall, then you may need to use something like LogMeIn.com, or similar remote sharing clients to get around the fact that you can not implement port forwarding.

This is ONLY for accessing your Mac mini from off campus, not for you local use.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can't connect to Mini using vnc

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.