I often find I want a file on my home machine when I'm out and about, so I would like to set up ssh server on my home machine to be able to login securely over the internet. It's my understanding that this requires to set up some port forwarding on my ADSL router at home, and then I can ssh in (using the ADSL router's IP address) and it should be secure using a public/private key pair I can make with ssh-keygen.

My question is, doesn't it require my router's IP address to be static or known beforehand? As far as I know my ISP might change my IP address dynamically, so I might find I can't log in some days without going home and googling for "What's my IP address?". Is there a usual way around this, and how frequently do consumer ISPs change your IP address typically anyway?

As well as a massive amount of files, I also want access to processes and devices, so I'm not interested in cloud or dropbox like answers.

link|improve this question

1  
I have had the same IP here at this house for 5 years. Obviously it's not going to be the same for everyone but they don't just up and change it unless your modem is offline when your lease expires and even then you'll get it back unless someone else gets it instead. So low chance it will change. – Paperlantern Jan 10 at 3:30
Thanks Paperlantern - if you post that as an answer I would accept it. – wim Jan 30 at 6:06
feedback

2 Answers

up vote 10 down vote accepted

Easiest way to deal with this is to use a dynamic DNS service... I use Dyndns. They are more into premium services these days, but you can still get a free domain from them... http://www.dyndns.com/services/upgrades/freevspro.html

Google Dynamic DNS and you will find lots of others.

Many routers have a hook into these services built in.

link|improve this answer
no-ip.org is what I've been using for a few months. The client works well to keep your IP up to date, but it's pretty much the same as dyndns – Rob Jan 30 at 15:18
couldn't ssh home yesterday, and it turned out to be due to my ip address having changed. so now i am going to look into a free dynamic dns, thanks. – wim Feb 16 at 11:20
feedback

Hear me out, you don't want to use dropbox for all your files but how about using it to keep your IP address handy? I use a bash script to find my IP every hour and record it in a folder in Dropbox. Then I always have my IP address handy because Dropbox is available for my smart phone. Then I just look up my IP and login to my server through ssh using key pairs from my netbook. I have blogged about this here: http://www.datarookery.com/w/2012/02/22/whats-my-ip-dropbox-style/

link|improve this answer
neat idea. a bit more stuffing around than dynamic DNS, but I can see how that would work. – wim Feb 27 at 23:03
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.