ssh.rst
changeset 1858 c6dc48292ee8
parent 1680 826133768ee5
child 1904 78357d58b7ab
equal deleted inserted replaced
1857:78eb9d75c720 1858:c6dc48292ee8
    25   $ ssh-keygen -y -f ~/.ssh/id_dsa >~/.ssh/id_dsa.pub  # recover pub key from priv
    25   $ ssh-keygen -y -f ~/.ssh/id_dsa >~/.ssh/id_dsa.pub  # recover pub key from priv
    26 
    26 
    27   $ ssh-keygen -p -N "newphrase" -P "oldphrase" -f ~/.ssh/id_dsa
    27   $ ssh-keygen -p -N "newphrase" -P "oldphrase" -f ~/.ssh/id_dsa
    28                                      # change passphrase of priv key
    28                                      # change passphrase of priv key
    29 
    29 
       
    30 Coping and deleting public keys.
       
    31 ================================
       
    32 
       
    33 To copy your public key to remote host (for automatic login by pubkey
       
    34 authentication)::
       
    35 
    30   $ ssh $user@$host cat ">>" "~/.ssh/authorized_keys" <~/.ssh/id_rsa.pub
    36   $ ssh $user@$host cat ">>" "~/.ssh/authorized_keys" <~/.ssh/id_rsa.pub
    31                                      # public pub key on remote host
    37                                      # public pub key on remote host
    32 
    38 
    33   $ ssh-copy-id  $user@$host         # alternative to previous command
    39   $ ssh-copy-id  $user@$host         # alternative to previous command
       
    40 
       
    41 To remove ``known_hosts`` key (usually need if you change server pubkey or
       
    42 change server)::
       
    43 
       
    44   $ ssh-keygen -R hostname
       
    45   $ ssh-keygen -R hostname -f ~/.ssh/known_hosts
       
    46 
    34 
    47 
    35 Shell login.
    48 Shell login.
    36 ============
    49 ============
    37 ::
    50 ::
    38 
    51