Created
January 27, 2017 07:50
-
-
Save ChristopherA/29b955d78a294151d959d3adea9351f0 to your computer and use it in GitHub Desktop.
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
| #generate key on client | |
| ssh-keygen -t rsa -b 4096 -C "[email protected]" | |
| #set permissions on client | |
| chmod 700 .ssh; chmod 640 .ssh/authorized_keys | |
| # start ssh-agent on client and give it new key | |
| eval "$(ssh-agent -s)" | |
| ssh-add ~/.ssh/id_rsa | |
| # On mac, copies the ssh key to clipbaord | |
| more ~/.ssh/id_rsa.pub | pbcopy | printf '\''=> Public key copied to pasteboard.\n'\' | |
| # Or copy usin ssh | |
| cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> .ssh/authorized_keys' | |
| ssh [email protected] mkdir -p .ssh | |
| ssh [email protected] "chmod 700 .ssh; chmod 640 .ssh/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment