Created
April 24, 2013 13:28
-
-
Save igorescobar/5452120 to your computer and use it in GitHub Desktop.
Alias to add your ~/.id_rsa.pub to ~/.ssh/authorized_keys on a remote server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ssh-copy-id user@host | |
| alias ssh-copy-id='_(){ ssh $1 -p 5022 "mkdir -m 700 ~/.ssh; echo " $(< ~/.ssh/id_rsa.pub) " >> ~/.ssh/authorized_keys ; chmod 600 ~/.ssh/authorized_keys"; }; _' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment