My university asked my SSH public key as I need access to universities computer cluster.

I generated SSH key using linux ssh-keygen -t dsa command. However, I don't know what information they need from me. ssh-keygen -t dsa command generated:

  • The key fingerprint
  • The key's randomart image
  • id_dsa
  • id_dsa.pub

Which one of these is my public key?

  • 3
    id_dsa.pub is your public key, id_dsa is your private key. – Josh Jolly Jun 10 '14 at 11:05
  • 3
    So I should never share my id_dsa? – PoGibas Jun 10 '14 at 11:06
  • 2
    That's correct. :) – Josh Jolly Jun 10 '14 at 11:06

The key fingerprint and random art image are not very important at this stage. What is important is the two files generated:

  • id_dsa: this is your private key and should be closely guarded as yours and yours alone.
  • id_dsa.pub: as the name suggests, this is the public key half of your key pair and may be freely distributed to anywhere you need to login to.
| improve this answer | |
  • I would also suggest using different key pairs for different hosts. It's a little more work up front, but makes things in some ways more managable down the road. (Just use host definitions in your ~/.ssh/config and you won't need to think about it.) – a CVn Jun 10 '14 at 12:13
  • 5
    It is very important that the university know that the public key they have comes from you, and not an imposter. This is where the fingerprint/randomart image comes in. You should send them the public key via e-mail or what ever, then they should phone you to get the fingerprint, and ask some personal question that only they can know the answer to, such as what you did last summer. This is probably one of the least understood parts of the system. The user of the public key must know where it came from. Who ever it came from, that is the person you will let in. – ctrl-alt-delor Jun 10 '14 at 12:36
  • @richard to be honest, I find it hard to believe that the university's admin would know a truly personal question and it's answer for every student; if email is not considered reliable then the key should probably be given in person (either to the admin or to a trusted party that will sign it) – Thanos Tintinidis Jun 10 '14 at 16:06
  • @thanosQR the point is the system is no more secure that the system you use to deliver the public key (or fingerprint, if used). – ctrl-alt-delor Jun 10 '14 at 16:32
  • 1
    @richard as everything with security, it depends on how much effort are you willing to put in and the risk associated. A university student cluster is not a very tasty thing that many people will conspire to get access to, and if they detect you doing something suspicious (like a lot of network traffic from your user) they can just shut you down and then ask. – Davidmh Jun 10 '14 at 17:42

id_dsa.pub is your public key; this is the one you can share with the rest of the world, establishing your identity; your university needs that to make you are a trusted party in their systems, just send that!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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