Created
December 26, 2013 12:00
-
-
Save andrezrv/8132876 to your computer and use it in GitHub Desktop.
Upload your public key to a remote server without using ssh-copy-id (i.e. for Windows/MINGW32 systems).
This file contains 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
# Create ssh directory if it doesn't exist | |
mkdir -p ~/.ssh | |
# Go to ssh directory | |
cd !$ | |
# Create public and private keys | |
ssh-keygen | |
# Upload your publick key to some server | |
cat ~/.ssh/id_rsa.pub | ssh user@host -p 22 "cat - >> ~/.ssh/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment