Last active
May 2, 2017 17:55
-
-
Save mattantonelli/8c2a0b84ffe51674f3eb to your computer and use it in GitHub Desktop.
Generate SSH keys and copy public key to remote host with ssh-agent.
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
# Generate your SSH key pair with the RSA algorithm | |
ssh-keygen -t rsa -C [email protected] | |
# Add the key pair to ssh-agent, if you are using it (optional) | |
ssh-add | |
# Copy public key to SSH destination | |
ssh-copy-id login@destination | |
# Show your public key | |
ssh-add -L | |
# SSH to remote host and confirm presence of public key | |
ssh login@destination | |
cat .ssh/authorized_keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment