7. Ssh2 Per-User Configuration

  1. Create your private & public keys of local, by executing:

             [root@deep] /#su admin
             [admin@deep /]$ ssh-keygen2

             Generating 1024-bit dsa key pair
             6 Oo..oOo.oOo.
             Key generated.
             1024-bit dsa, admin@deep.openna.com, Sun Feb 13 2000 05:33:38 -0500
             Passphrase :
             Again      :
             Private key saved to /home/admin/.ssh2/id_dsa_1024_a
             Public key saved to /home/admin/.ssh2/id_dsa_1024_a.pub

  2. Create an identification file in your ~/.ssh2 home directory on local:

             [admin@deep]$cd ~/.ssh2
             [admin@deep ]/.ssh2$echo "IdKey id_dsa_1024_a" > identification


    It's optional to create an identification file on Remote. The identification file contains the name of the private key that is to be used in authentication.

  3. Copy your public key of Local id_dsa_1024_a.pub to ~/.ssh2 home directory of remote under the name, say, Local.pub.

  4. Create an authorization file in your ~/.ssh2 home directory on remote:

             [admin@remote ]/.ssh2$touch authorization


    The ~/ means the user home directory.

  5. Add the following one line to the authorization file on the remote host:

             [admin@remote ]/.ssh2$vi authorization

             key                     Local.pub