Those of us who use secure shell (SSH) for logging in to remote machines, already know about key authentication, which is so much easier and sometimes more secure than password authentication. We also know that in order to make it work you need to:
- generate a pair of keys with ssh-keygen command
- copy public key from the local machine to authorized_keys file on the remote machine
- fix the permissions of the .ssh/ folder and authorized_keys file on the remote machine
And that’s just what we have been doing. Or at least me. Today, after approximately 10 years of using secure shell, I’ve learned that there is a ssh-copy-id command, which will automatically add your current public key to a remote machine’s authorized_keys file and arrange for correct permissions. Wow!
Thanks to @commandlinefu and top 10 one-liners blog post.
I just used this for the first time today and I must say that it’s a real time saver.
Thanks for the excellent tip!
Unfortunately it is not available on OS X neither on some older Linux distros :(
P.S. I see you enabled twitter login — good!
svyatogor: brew install ssh-copy-id