SSH Without a Password

SSH Without a Password [原文链接]

The following steps can be used to ssh from _disibledevent=>http://www.fatcow.com/edu/ssh-nopass-be/

Notes:

  • The system from which the ssh session is started via the ssh command is the client.
  • The system that the ssh session connects to is the server.
  • These steps seem to work _disibledevent=>OpenSSH.
  • The steps assume that a DSA key is being used. To use a RSA key substitute 'rsa' for 'dsa'.
  • The steps assume that you are using a Bourne-like shell (sh, ksh or bash)
  • Some of this information came from:
    http://www.der-keiler.de/Mailing-Lists/securityfocus/Secure_Shell/2002-12/0083.html

Steps:

  1. On the client run the following commands:
    $ mkdir -p $HOME/.ssh $ chmod 0700 $HOME/.ssh $ ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ''
    This should result in two files, $HOME/.ssh/id_dsa (private key) and $HOME/.ssh/id_dsa.pub (public key).
  2. Copy $HOME/.ssh/id_dsa.pub to the server.
  3. On the server run the following commands:
    $ cat id_dsa.pub >> $HOME/.ssh/authorized_keys2
    $ chmod 0600 $HOME/.ssh/authorized_keys2
    Depending _disibledevent=> ssh(1)
  4. ssh-keygen(1)
  5. ssh_config(5)


  6. Tags: 

    延伸阅读

最新评论

发表评论