Wednesday, August 17, 2011

Passwordless ssh logins

  • You can log-in into another machine through ssh without being prompted for a password following the method depicted here:

http://oreilly.com/pub/h/66

Watch out your file permissions 0600 for ~/.ssh/authorized_keys and 0700 for ~/.ssh , otherwise it won't work. The key you add to ~/.ssh/authorized_keys. This passwordless login will work only for the specific user of which you added the public key into the remote server's authorized_keys file.

 

Though, there are security concerns, it works for testing purposes such as sending the postgresql WAL to a backup server. Once you've played with it a bit, you can think of strengthening the exchange mechanism.

Another alternative is to use the ssh-copy-id script, which I find very convenient.
http://linux.die.net/man/1/ssh-copy-id

No comments:

Post a Comment