The chance is very much lower than any of these events:
- The computer spontaneously catches fire during the key generation process.
- Great Britain is wiped out by a falling asteroid during the very same second.
- A rogue gorilla escaped from a zoo enters your living room and mauls you.
- You win millions of dollars at the lottery three times in a row.
So the basic conclusion is that you should not worry about getting twice the same SSH key: it really will not happen in your lifetime.
On a more theoretical point of view, there are about 28164 possible 8192-bit RSA keys (that's really a lot). However, ssh-keygen
will use a pseudo-random number generator which works over a much more reduced internal seed, which depends on the operating system but will typically have size at least 160 bits. This reduces the number of possible keys to a much lower (but still huge) number, 2160. Even with tremendous computing power (I am not talking about a bored student with a few dozens of PC; rather, think "Google"), probability of finding the very same key after a few years of effort is less than 2-100. Comparatively, the events I list above can be estimated to occur with probabilities roughly equal to 2-45, 2-50, 2-60 and 2-71, respectively: these are billions of times more probable.
Of course, with a flawed PRNG, anything goes.