There seems to be a lot of confusion on the difference between a host key, and a user key.
A host key is used to establish the identity of the remote host to you.
A user key is used to establish the identity of yourself to the remote host.
Since these keys are typically shown as just a sequence of characters, it can be difficult for a human to tell at a glance whether they have changed. This is the purpose of randomart. A small deviation in the key will cause a significantly different randomart image.
As for why you would care, it is important to verify the identity of the remote host, as it is possible that someone could intercept your traffic (MITM attack), and view/manipulate everything sent and received.
It is not important to verify yourself though. You don't need to confirm "yup, I'm me". Even if somehow your user key had changed, the remote server will either let you in, or it wont. Your connection is at no higher risk of eavesdropping.
So why then does ssh-keygen
show the randomart image when you generate your user key?
Because when the randomart code was introduced to ssh-keygen
[grunk@cvs.openbsd.org 2008/06/11 21:01:35], host keys and user keys were generated the exact same way. The extra information output may not be of any use for a user key, but it doesn't hurt (other than potentially causing confusion).
Now, when I said "when the randomart code was introduced", this was because the code has since changed. These days, most distros use ssh-keygen -A
to generate host keys, which is a new feature. This feature generates numerous different types of keys (rsa, dsa, ecdsa), and it does not show a randomart image. The old method could still be used for generating host keys, but it generally isn't. So now the old method is only used for user keys, but the randomart feature remains.