Last active
March 7, 2016 06:15
-
-
Save dungdt88/72fbaf85ef3cf2926670 to your computer and use it in GitHub Desktop.
SSH with Public Key
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
# On Client | |
## Generate Key | |
ssh-keygen -t rsa {-b 4096} | |
## Copy identity to remote-host (requires remoteuser's password) | |
ssh-copy-id -i <path/to/public/key> <remoteuser>@<remotehost> | |
## or just copy the content of file ~/.ssh/id_rsa.pub on Client to the end of file ~/.ssh/authorized_keys on Server | |
## SSH | |
ssh -i <path/to/private/key> <remoteuser>@<remotehost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment