Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created an ssh key with ssh-keygen, and I got this output as a result:

The key fingerprint is:
84:21:3d:ab:d5:5e:05:a0:b6:ab:0f:33:af:3b:3b:82 cidr@randombox
The key's randomart image is:
+--[ RSA 4048]----+
|             .ooo|
|       o   ..o   |
|      o + .oo .  |
|     . + o....   |
|    +...S  ..    |
|       .o   .    |
|    .  o o ..    |
|   E . .o +      |
|      ......     |
+-----------------+

Is there a way to view the randomart image of an existing key? (Also, what's the purpose of randomart in connection to ssh or cryptography?)

share|improve this question
up vote 15 down vote accepted

try this:

ssh-keygen -lv -f .ssh/id_rsa

This can be found in ssh-keygen's manpage. As for randomart's purpose:

"The randomart is meant to be an easier way for humans to validate keys.

Validation is normally done by a comparison of meaningless strings (i.e. the hexadecimal representation of the key fingerprint), which humans are pretty slow and inaccurate at comparing. Randomart replaces this with structured images that are faster and easier to compare."

This text was taken from here: http://superuser.com/questions/22535/what-is-randomart-produced-by-ssh-keygen

share|improve this answer
    
Thannks a lot buddy, this helps a lot :) – Iori Sep 6 '12 at 12:06
    
For more explanation of situations for use, see the SU discussion – New Alexandria Oct 22 '15 at 20:54
    
Please note that it works also for id_rsa.pub file: ssh-keygen -lv -f .ssh/id_rsa.pub – Grzegorz Wierzowiecki Oct 24 '15 at 14:48
    
Beware that the randomart generated by older versions of ssh-keygen (say from openSSH_6.6.1p1) will not match that of newer ones (say from openSSH_7.1p2). If the openSSH package-versions differ between your client and server, consider upgrading or checking out workarounds. – SeldomNeedy Apr 28 at 0:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.