Jul
02
2013
There are times when you really want to get rid of SSH password authentication, however SSH is VERY picky about permissions etc. I just found out that there's a tool for that in all Linux boxes!
As promised, the two simple steps:
- Create your keypair (assuming you don't already have it ready)
$ ssh-keygen -t rsa
Make sure NOT to enter a passphrase, or you'll have to enter that every time you use the keypair! - Copy it over to the server and make all necessary adjustments (create directory, fix permissions, etc)
$ ssh-copy-id -i id_rsa.pub user@example.com
You'll be prompted for your password, and then notified that you can now try logging into the server. - Enjoy!