Last active
August 29, 2015 13:57
-
-
Save pete911/9504088 to your computer and use it in GitHub Desktop.
ssh key based authentication
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
mkdir ~/.ssh | |
chmod 700 ~/.ssh | |
ssh-keygen -t rsa -b 4096 -f ~/.ssh/<key_name> | |
ssh-copy-id -i ~/.ssh/<key_name>.pub <username>@<host> | |
# add following entry to ~/.ssh/config file | |
Host <host|alias> | |
HostName <host|ip> | |
User <username> | |
IdentityFile ~/.ssh/<keyname> | |
ssh <host|alias> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment