I want to be able to access a linux machine at home from anywhere. I understand just enough about routers that I normally need some static ip address.

I have read about DynDNS, and honestly do not understand how it works. I have tried to set it up, but I cannot ping my computer or anything. I just do not understand the principle.

I also read about ssh remote forwarding. Is that a viable option?

I have seen the related posts, but I just need a clear explanation of how one might get the connection across the internet (rather than just a LAN.)

I will be watching for comments/complaints about vagueness or information I missed. I will try to edit accordingly.

  • 1
    The typical situation is that the computer you want to access is sitting behind a router. Usually routers let communication out pretty freely, but are a lot stricter with incoming traffic. To be able to reach your computer, you will probably have to configure port forwarding, and how to do that relies solely on the router you are using.
    – nikolas
    Feb 9, 2012 at 1:19
  • So there is no way to set up such a system without configuring the router?
    – Feynman
    Feb 9, 2012 at 1:23
  • @nijansen, I changed the title to imply this is an important objective. If it not possible, then so be it.
    – Feynman
    Feb 9, 2012 at 1:25
  • Maybe check out TeamViewer (teamviewer.com/en). They do have packages for various Linux distributions and so far I have not run into any of the above mentioned problems while using it.
    – nikolas
    Feb 9, 2012 at 1:27
  • I don't suppose setting up a vpn is another possible solution is it? I was just looking into this as another possible option.
    – Feynman
    Feb 9, 2012 at 1:35

2 Answers 2


DynDNS removes the need for a static IP address by providing you with an easy to remember DNS name (yourhomelinux.dyndns.org) so you don't have to remember your IP address or keep track of its changes. There can be a few minutes of inaccessibility when your IP changes if DynDNS does not get notified right away, or if there are a few minutes left on the TTL for DNS records if your DNS server caches.

Your router may support DynDNS in which case every time the router sees it gets a new IP, it tells DynDNS to update your hostname with the new IP. If your router doesn't support it, you install a piece of software on a PC that pings them periodically and causes an update if the IP has changed.

That still doesn't answer remote access. All you are able to do now is find your house, but you still don't have a key to the door. When you try to ping your DynDNS name, it is really pinging your router. If your router is configured to not respond to a ping (which it sounds like that may be the case), you will still not get a reply when you ping your host.

After you have DynDNS working and you confirmed it is pointing to your home IP, you need to set up a port forward in your router to map an external port on the router, to an IP address and port of a PC on your local network.

For example you could map port 22222 on your router to the LAN address so you could SSH into your server remotely ssh -p 22222 [email protected] Using non-standard port numbers is good because 1) it can resolve port conflicts (what if you want to be able to SSH into 3 machines on the LAN) and 2) it is a little more secure as lots of hackers scan for port 22 (among many others) to see if they can gain access to systems.

To do remote desktop, you will need some sort of VNC server or other remote desktop server for Linux. Once you get a remote desktop service running, you set up a port forward similar to the previous example, except you forward to the VNC port of your local PC.

There may be some linux remote desktop solutions here that are suitable for you.

What worked particularly well for me to be able to access my work computer from home on occasion is to use Team Viewer. Their server runs on Linux and is always fast for me. I don't even have an account, I just run the software and use the PIN to access my PC.

I haven't had good experiences using VNC for Linux, usually the connection is choppy through VNC while other remote desktop services on the same PC worked much more smoothly.

EDIT: I'm not sure if the title changed, or I misread it initially, but you will have to do some configuration to the router. You can't do remote desktop to your LAN without at least one change to the router. Otherwise how does it know which PC on your network to control? Using something like LogMeIn doesn't require changes to your router, but it also depends on a 3rd party server, and doesn't work on Linux.

Hope that helps!


I've had this problem before. I typically use TeamViewer. Recently, I discovered Join.me which is pretty much what TeamViewer does only it's a bit simpler and might possibly be easier to use for some users. If I want to always be able to connect to a computer remotely via the internet, I use LogMeIn (the free version should suffice).

You must log in to answer this question.

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