next up previous
Next: Managing keys with ssh-agent Up: Introduction to SSH Versions Previous: Generating SSH2 Key Pairs

Generating SSH1 Key Pairs

Key generation for SSH1 begins in much the same way:

mbland@defender
/home/student/mbland -> ssh-keygen1
Initializing random number generator...
Generating p:  ..........++ (distance 102)
Generating q:  ............++ (distance 150)
Computing the keys...
Testing the keys...
Key generation complete.
Enter file in which to save the key (/home/student/mbland/.ssh/identity):
Enter passphrase:
Enter the same passphrase again:
Your identification has been saved in /home/student/mbland/.ssh/identity.
Your public key is:
1024 35 1242644011468066306624959825222292553266583039072289321333183076450939
803185937165302584768794486290682344210796792081448431964452132612759705157459
590401969775484674506955300214909857435651243966626794426301033400283753959104
523579590751005152438335881975736554762778872247864096463529626592511666622881
85517 mbland@defender
Your public key has been saved in /home/student/mbland/.ssh/identity.pub

Now ``chmod 700 .ssh && cd .ssh'' and take a look around:

mbland@defender
/home/student/mbland/.ssh -> ls -l
total 6
-rw-------  1 mbland  student   529 Apr 30 18:38 identity
-rw-------  1 mbland  student   333 Apr 30 18:38 identity.pub
-rw-------  1 mbland  student   512 Apr 30 18:38 random_seed

Again, if the file permissions in your directory don't look like this, chmod them until they do. Here's a breakdown of the contents of this directory:

Though, like SSH2, these names aren't terribly interesting either, you shouldn't rename ``identity'' at all. But go ahead and rename ``identity.pub'' to `` <localhost>.pub'' (i.e. ``defender.pub'') to ease the management of public keys between hosts.

You need to create an ``authorized_keys'' file by issuing a ``cp localhost.pub authorized_keys''. Then, after you've executed ssh-keygen1 on all the other hosts to which you wish to connect, you can update each host's authorized_keysfile by carrying out the following steps:

scp defender.pub <remotehost>:.ssh/
ssh1 <remotehost>
cd .ssh
cat >> authorized_keys < defender.pub

Again, you may be prompted for your password a couple of times, and you might prefer to update your authorized_keys file by hand, though the cat trick in this case might prove much more convenient. As opposed to SSH2, SSH1 keeps all its public keys together in a single file, rather than keeping a database of filenames corresponding to public keys.


next up previous
Next: Managing keys with ssh-agent Up: Introduction to SSH Versions Previous: Generating SSH2 Key Pairs
Michael S. Bland
2000-11-22