I have links I want to set up for remote portals, but in order to estimate if it's worth the travel, it would be helpful to know what the odds are of getting a portal key through hacking.
Warning: This answer is now very out of date.
The answer by Max now represents the current state of play more accurately.
I recorded and evaluated 238 hacks, 198 of own and 40 of enemy portals. I've found the following frequency of getting a portal key:
One can only guess what the real probability is, but I'd guess about 15%.
Edit: Some more details, because I was asked:
The probability does NOT seem to depend on the level or the faction of the portal, although the confidence of this statement is much lower, because there are less samples for each condidtion. But the more samples there are for each condition, the closer the numbers are to the ones I reported above.
Note that this could change with each update, Niantic could just tune some parameters without us noticing. My samples were all collected during March 2013 from the 14th to the 25th.
If you are going to hack a portal to get a key try the following and the probability will be about 90% to get a key. all you have to do is drop the keys of the portal you want a key from.