Setting up my MAC MINI as a Home Server to access remotely

I'm hoping someone can help me here. I just bought a Mac Mini and would like to be able to access the machine remotely. I was looking at Vine VNC Viewer and Server and can see the MAC MINI when I am at home no problem which is great. I just would like to view the machine anywhere via the internet or program. Can anyone direct me to a step by step procedure on how to achieve this? I want to be able to access a connected Hard Drive as well with all my music and photos and be able to send people photos via links if they would like to see something. Do I need to create an FTP Server? Sorry if my terminology is wrong but just been trying a bunch of things with no luck. I do have sharing access working with Apple Remote Desktop and File Sharing when I'm at home though no problem.

Thanks in Advance.

Macbook Pro 2.2ghz 4gb Ram, Mac Mini 2.0ghz, Mac OS X (10.5)

Posted on Sep 15, 2009 12:11 PM

Reply
4 replies

Sep 15, 2009 1:49 PM in response to dtothep

The easy answer is to use an Apple Airport router, Mobile Me, and back to my Mac. But, that's expensive, and it doesn't do much more than allow you to get get to your Mac, it doesn't set it up as a web or FTP server.

It's fairly straight forward. The tricky part really is not to get your machine hacked into. *If you are asking this question, you probably don't want to do this.* Doing it is one thing. Doing it right means being confident you don't leave something open for somebody to get in.

We'll have to assume that you know how to configure port-forwarding and modify the DHCP configuration on your router and that you understand how all of that works -- that's all outside the computer.

You'll also need a dynamic DNS provider and a domain name, or, at the very least, a site somewhere on the Internet to which you can post the Internet-facing IP address of your router since your ISP may reassign this periodically. Alternatively, you could write a script to ask your router what it's WAN address is and then post that on some server somewhere where you'd know where to look for it (bad solution).

First: set your router's DHCP address range to something that leaves some IP addresses aside for static IP on your subnet. For example, my router assigns addresses in the range 192.168.1.1 to 192.168.1.200 -- so everything from 192.158.1.201 to 192.168.1.243 is left over for static IPs.

Don't configure the port-forwarding on your router just yet.

Once you've got all that taken care of, go to System Preferences, click on your network connection in the left-panel. Then click on the "Configure" pull-down and select "Using DHCP with Manual Address" and in the IP address field below, give your machine an IP address in the same subnet (192.168.1.*) but outside the range that the router is going to assign addresses for. For example, 192.168.1.201.

Open up /Applications/Utilities/Terminal.app and type:

sudo nano /etc/sshd_config

... find the line that says:

PasswordAuthentication yes

... and, change it to

PasswordAuthentication no

... and save the file. You want to make sure that you don't allow password-based logins to your computer. This will force SSH (secure shell) to require that you create and use encryption keys and encrypted logins to access your machine. No passwords.

Now, you can go back to your router and configure port-forwarding on it to forward in-bound connections to the ports for the services you want to use. You will need port 22 for secure shell, and if you want to use the web server, port 80. It might not be a bad idea to make the port on the router different than the port it forwards to on your Mac, if only because it would stop casual attackers.

Now is a good time to set up your account with your dynamic dns provider (like dyndns.org) and get your domain name. It's not completely necessary, but if you don't want the name and IP address of your computer to change all the time, then you want to.

Once that's set up, go to System Preferences on the Mac and click on the 'Sharing' icon. Check off 'Remote Login', 'Screen Sharing, and 'Web Sharing'. Congratulations, you've now enabled the web server, VNC, and remote logins.

To login to your computer remotely, you're going to need to create encryption keys. Go back to Terminal.app and do:

ssh-keygen

... which will create your creddentials for your account. Now, lets make a key that you can authorize to login:

ssh-keygen -t rsa -f home_rsa

... which will create two files: home_rsa and home_rsa.pub. You want to copy home_rsa.pub to the list of authorized keys for your user:

cat home_rsa.pub >> ~/.ssh/authorized_keys

... now you can take the home_rsa key, put it on a USB key fob, or whatever and use it as your private key for logging in via SSH.

You can use the tunneling features of SSH to tunnel VNC through the secure connection, and you can use 'scp' or 'sftp' to transfer files.

For example, for logging into my machine back home, I do:

ssh -i home_key -C jd@nodomain.net -L 5901:localhost:5900

Which logs me in via secure shell and forwards local port 5901 to port 5900 (the one used by VNC) on my computer at home. Then I can use screen sharing by opening another terminal Window and typing:

open vnc://localhost:5901

OS X has the VNC support built-in, so you don't need other apps.

Sep 15, 2009 4:20 PM in response to dtothep

Try TeamViewer Screen Sharing and File Transfer utility:
<http://teamviewer.com/index.aspx>

TeamViewer will most likely give you at least 90% of what you want. You can transfer files via TeamViewer, just via a method different from file sharing.

If TeamViewer gets you going, you can worry about more intimidating methods at your leasure.

An alternative to TeamViewer would be LogMeIn.com (free screen sharing, but you pay for file transfer). After that there are pay utilities such as GoToMyPC.com

Sep 15, 2009 2:04 PM in response to J D McIninch

WOW! That sounds a little intimidating..but I am up for the challenge J.D. I really appreciate your response here. I have a couple questions to ask you about your setup provided. When I alter the router accordingly will these cause my other computers on the network any problems? I have an Airport Extreme.

It sounds like from what your saying that I don't need any third party software? What does "Vine VNC Viewer" provide then? It was nice seeing everything on my home network but wasn't sure if that software was allowing that to happen or not. I also want to know what sharing options need to be selected now? Any of them? Am I using Remote Management or Login at all? I appreciate the heads up on getting hacked into that I do not want. So with this setup will I be able to host my websites that I currently use with a Third Party Provider? One last question for you...is there any software out there that would assist in any of this setup? Anything to just have it work with the click of a button? I install something on the MacMini and something on my Laptop and bam I'm connected all around? Probably not from what it sounds like...but then what does Apple Remote Desktop provide?

Thanks a bunch for your help.

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.

Setting up my MAC MINI as a Home Server to access remotely

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