SSH keys beautifully explained
Understanding how SSH keys work and how to properly use them has long baffled even some of the most venerable programmers.
In the physical world, a given key usually fits just one lock. We have to special order multiple locks "keyed the same" for entry doors and such. To share access to something, we give out multiple copies of these physical keys.
It's thus tempting to imagine the shared "public key" to be analogous to a physical key and the "private key" to be the lock.
Actually, it's the other way around.
Wogan explains in "How to set up public key ssh authentication" (January, 2014).