This isn't the recommended way to do things. If you have a dynamic IP address just disable password authentication and use key-based authentication. If for some reason you absolutely need password authentication, use a strong password and limit the ability of people to try and brute force your system by installing something like Fail2Ban.
-
http://library.linode.com/security/ssh-keys-
http://library.linode.com/security/fail2banGoing back to your original inquiry, there isn't a reliable way to do this unfortunately. You could potentially get it down to blocks operated by your country's RIR. In theory these should all be delegated out, and I don't personally see them changing much. But you should have a script that runs periodically to make sure you have the right exceptions in your firewall. You could even go a level lower and only add firewall exceptions for your ISP, but they may get a few more blocks of IP addresses moving forward so you'll need a script to check this. And if you are not connecting via your ISP, you would need to use Lish to add a one-time exception.
I'd recommend the first option...it's served me well so far.
-Tim