Created
January 11, 2017 16:39
-
-
Save instaBOT/dc45155cb054e89b22e518b3f1fabab6 to your computer and use it in GitHub Desktop.
Create a SSH key pair (RSA) in Ubuntu 14.04.
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
#!/usr/bin/env bash | |
cd | |
set -eu | |
# Create passphrase-less RSA key pair for SSH. | |
# - 'rsa': protocol version 2 | |
# - 4096: the number of bits in the key to create (for RSA keys, minimum: 768, default: 2048 bits) | |
# - "": passphrase | |
# - '~/.ssh/id_rsa': the new key file | |
ssh-keygen -t rsa -b 4096 -N "" -f ~/.ssh/id_rsa | |
printf "\npublic key of the generated RSA key pair:\n\n" | |
cat ~/.ssh/id_rsa.pub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment