Flexion.Org
Bad grammar and typos for total strangers
Wiki › Create Public Private Key Pair
Wiki Index All Recent Edit Bottom

Create a public/private key pair

If you don't already have a public/private key pair, you can create them as follows...

 ssh-keygen -t rsa

This will prompt you for a location to save the keys, and a pass-phrase:

 Generating public/private rsa key pair.
 Enter file in which to save the key (/home/user/.ssh/id_rsa): 
 Enter passphrase (empty for no passphrase): 
 Enter same passphrase again: 
 Your identification has been saved in /home/user/.ssh/id_rsa.
 Your public key has been saved in /home/user/.ssh/id_rsa.pub.

If you accept the defaults you'll have a pair of files created, as shown above, with no passphrase. This means that the key files can be used as they are, without being "unlocked" with a password first. If you're wishing to automate things this is what you want. If you want more security, then enter a passphrase.

I create a key pair for the root account, and another for my user account.

  • The key pair for the root account has no passphrase so my trusted server can perform remote admin duties such as backups.
  • My user account key pair are protected with a pass phrase, as this key pair travels on my laptop.

$Id: CreatePublicPrivateKeyPair,v 1.1 2008/04/14 09:37:32 martin Exp $

Wiki Index All Recent Edit Top
 
Valid XHTML Valid CSS Hacker