RSS RSS feed | Atom Atom feed
Popular Articles: Tom Riddle's Magical Diary | AJAX Lego Robot | AJAX CAPTCHA | SQL Multisets

Automatic SSH/SCP Login without Password

  1. generate on your LOCAL machine a keypair with: ssh-keygen -t rsa (dont type in any password, just keep hitting enter)
  2. make sure your private key resides under ~/.ssh (under windows this can be under c:\documents and settings\yourname\.ssh or under c:\cygwin\home\yourname depending on your ssh-keygen tool which you need to download
  3. file transfer the PUBLIC key to the machine you which to automatically logon to. Under the directory ~/.ssh (create it if necessary) concatenate your public key with the file authorized_keys (create file if needed)
  4. make sure the authorized_keys is not read or modifiable by group or others my doing chmod 700 ~/.ssh/authorized_keys
  5. make sure the ~/.ssh directory on the REMOTE machine is not read or modifiable by group or others my doing chmod 700 ~/.ssh
  6. You may need to enable empty password authentication (need root access) on the REMOTE machine in the config file sshd_config. Make "permitemptypasswords yes". Restart SSH Daemon on REMOTE.
  7. On some machines, you may also need to make sure your HOME directory is not writable by group or world. Type chmod 700 ~
slashdot digg del.icio.us technorati [more]