March 14, 2005

SSH Without Passwords

Posted at March 14, 2005 02:56 AM in Computing .

Users who go between multiple Linux and UNIX machines are often retarded by annoying password prompts.

Perform the following steps to eliminate a password prompt when logging in to server from client.

  1. On the client machine, run ssh-keygen -t dsa. Take note where the output is stored. When prompted for a passphrase, just press ENTER.
  2. Copy the public key to the server machine: scp ~/.ssh/id_dsa.pub user@server:/home/user/authorized.pub
  3. Log in to the server machine.
  4. If it doesn't exist, create the directory .ssh in your home directory and set permissions to 700. mkdir ~/.ssh && chmod 700 ~/.ssh
  5. If it doesn't exist, create an authorized keys file: touch ~/.ssh/authorized_keys
  6. Copy the contents of the public key to the authorized_keys file: cat ~/authorized.pub >> ~/.ssh/authorized_keys
  7. Don't enter your password any more
  8. There are some security concerns for this method. Any individual with access to your console can log into remote machines. To simplify matters, you can specify a simple passphrase during ssh-keygen. You can use this passphrase instead of your account password when doing an SSH.

Trackback

You can ping this entry by using http://blog.case.edu/gps10/mt-tb.cgi/663 .

Comments

Post a comment










Remember personal info?