How to run an SSH server without a static IP address

To get started with ssh in general, install openssh-server.

sudo apt-get install openssh-server

On the next restart, this should start up automatically. To connect to the computer remotely, just enter the following in a remote terminal, substituting the ALL-CAPS names for your own:

ssh USERNAME@IPADDRESS

Now, to take care of the dynamic ip forcing you to recheck the IP all the time:

Get a free account on dyndns.com and choose the name you want to type when you connect.

Once that is done, install "ddclient" on the server machine. This will automatically update the IP address for you with dyndns.

sudo apt-get install ddclient

When you run it, it will ask you a series of questions, so have your username, password, and the URL you chose earlier ready to type in. It should also automatically add itself to startup.

That should be it. Now when you ssh, just use the URL you chose instead of your IPADDRESS since this should automatically update if the IP changes.

If you have a router, make sure to forward port 22 to your server! There are lots of guides on this at portforward.com for your specific router.


You could get a hostname via a service like http://www.noip.com/ and then setup a ssh server. you would then connect via e.g.

ssh [email protected]

check out this link:

http://www.raspberryanywhere.com/

Perhaps it can be of some help. I'v been using the service from several weeks and it works great!

The link provide a simple software teamviewer like to access your raspberry board anywhere you are. Furthermore, you can use your usual SSH client; they just provide a virtual address to connect to your board via SSH or HTTP . It worths a try for sure!