Changes between Version 3 and Version 4 of OpenSsh


Ignore:
Timestamp:
03/15/11 14:19:44 (8 years ago)
Author:
joshuadf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenSsh

    v3 v4  
    11== Creating a keypair ==
    22
    3 Creating a key for your user is straightforward:
     3Creating a key for your user is straightforward. You will need to generate a new private key and put your public key (`id_rsa.pub`) in the
     4`~/.ssh/authorized_keys` file on any machine you want to connect to.
     5
     6The command {{{eval `ssh-agent`; ssh-add}}} loads your private key into memory so that you don't need to type your passphrase more than once.
     7You need to run that command each time you log in.
     8
     9See the
     10[http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-ssh-configuration-keypairs.html Red Hat Deployment Guide] for more detailed step-by-step instructions. Here is a quick example:
     11
    412{{{
    5 ssh-keygen -t rsa # enter a passphrase different from your password
     13ssh-keygen -b 4096 -t rsa # enter a passphrase different from your password
    614chmod 755 ~/.ssh
    715# tell ssh to allow connections using that key
     
    1220}}}
    1321
    14 You will also need to put your `id_rsa.pub` key in the
    15 `~/.ssh/authorized_keys` file on any machine you want to connect to.
     22== Multiple private keys ==
    1623
    17 The command {{{eval `ssh-agent`; ssh-add}}} loads your private key into
    18 memory so that you don't need to type your passphrase more than once.
    19 You need to run that command each time you log in.
     24Best practice is to create a new keypair for connections to different systems. For example, say you get an account from the CS department for a project. Generate a new keypair with `ssh-keygen` and save it with a new name such as `cs_rsa`. By default ssh will not know to use that new key though, so you can either specify on the command line or create a `~/.ssh/config` file. The format is like this:
    2025
    21 See the
    22 [http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-ssh-configuration-keypairs.html Red Hat Deployment Guide] for more detailed step-by-step instructions.
     26{{{
     27Host *.cs.washington.edu
     28  User joshuadf
     29  IdentityFile ~/.ssh/cs_rsa
     30}}}
     31
     32You can also load multiple private keys into a running copy of `ssh-agent` with a command like `ssh-add ~/.ssh/cs_rsa`.
     33
     34== Connecting from Windows ==
     35
     36[http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] is a small free client which also utilities for command-line connections (Plink) and generating keys (PuTTYgen). Make sure to export keys in the OpenSSH format for adding to your `~/.ssh/authorized_keys` file.
     37
    2338
    2439== More details ==