Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to be able to SSH into my macs over the internet using a DNS name like or something similar instead of having to enter an IP address every time. How can I assign domain names to my computers so I don't have to use the IP address to access them anymore? Any insight would be appreciated!

share|improve this question
up vote 9 down vote accepted

You need to go a domain registar, and register a domain name with them. You then create an A record to point to your IP address with whomever is hosing the DNS servers that are hosting your domain (this may or may not be your registar) - after that, simply use the domain name in place of wherever you'd use the IP address.

Some websites, like DynDNS, do half the work for you. They have already registered a domain and set up the DNS servers, and then hand out subdomains. You can't get with them, but you can get to point to your IP address for free (the other way costs about $10/year depending on the type of domain name you go with). All you have to do is sign up at the website and pick a subdomain name and enter your IP to get started :)

share|improve this answer
what about if your IP is dynamic? – Jim Thio Jun 8 '13 at 16:33
You need to install an Update Client. – Karan Jun 8 '13 at 23:03

You could sign up for DynDns:

That's how I've done ssh to my machine in the past. I believe they have a free version that allows you to have at least one domain name.

It's particularly nice because of the features they add such as the "Internet Guide" which allows for some content restriction control.

share|improve this answer
They have a free version that allow you to register up to 2 machines. That's what I use. – criziot Jun 21 '12 at 21:00
@criziot: Oh good! That's even better. – Chris Harris Jun 21 '12 at 21:02

If you have a static IP, you can assign an alias for your ip in the /etc/hosts file: localhost
xx.xx.xx.xx alias.whatever

If you have a dynamic IP, you could use the service by sites like to get a subdomain.

share|improve this answer
+1 I do this all the time... and in windows, hosts is under system32/drivers/etc/. I don't bother with a . in the alias. So I always have work as "work". Some more goodies to look in to are .ssh/config, where you can include the IP address in a host entry, along with target username and/or use a specific key. – Chris K Jun 21 '12 at 22:31

Assuming you mean over the internet, I would use if you have a static IP address. Static IP address means your IP does not change over time.

If you have a dynamic IP address I would buy your domain through then point the Nameservers to They allow you to use all the free dynamic domains you want.

share|improve this answer
Static IPs from "home" connections are very-super-rare. So, any solution based on static IP is doomed to failure. – killermist Jun 22 '12 at 5:50
I have a static ip at home. It wasn't even a chosen option. I have had pretty much the same ip since the 2 years I've had this service. – alexander7567 Jun 22 '12 at 13:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .