Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Upload your public key to a remote server without using ssh-copy-id (i.e. for Windows/MINGW32 systems).
# Create ssh directory if it doesn't exist
mkdir -p ~/.ssh
# Go to ssh directory
cd !$
# Create public and private keys
# Upload your publick key to some server
cat ~/.ssh/ | 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