For the Impatient: (Actually) Generating a
key
It is fairly easy to do:
Filename: I usually give the key file a different
name than the default.
This makes knowing WHERE the key to be used easier. For example I
have generated a key for use from the Liverpool machines and one for
use from Adelaide. Not surprisingly they are called:
| Liverpool_id_dsa |
| Adelaide_id_dsa |
Passphrase: You will be asked for a
passphrase. As Alan said in his FAQ:
"The pass-phrase is just that... pick a phrase that is memorable
to you. Put in a miss-spelling and/or replace a letter by a digit to
enhance security."
Remember that this passphrase is all that is stopping someone
logging into your account. DO NOT chose it to be the same as your
regular password!
Remember that these files should be
stored in your ~/.ssh directory. If I talk about a file from
now I will be assuming that you are starting in the the
~/.ssh directories, NOT your home (~) directory.
So now you have generated your SSH keys (keys plural -- because there are
both public and private keys, but that comes later...) what do we do
with them? Read on...
General Comments
There is some confusion on when you need to generate a key. If you
are just going to be logging into a machine occasionally you do
not need to generate a key.
If you have already generated a key (following the suggestions in
Alan's FAQ)
delete those keys, on every machine where you copied them, NOW!
Keys in Secure Shell allow you an easy way of identifying yourself,
so you don't need to type your password in every time you log into a
machine. Think about this for a moment and you will hopefully see the
danger. If you don't manage your keys properly, anyone who has access
to them can log into your accounts. This is why I strongly suggest
you delete the keys that you might have previously generated.
|