Created
July 22, 2021 09:50
-
-
Save uburuntu/83dfd84d1daff7c2b60000321339395f to your computer and use it in GitHub Desktop.
Create SSH Key
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
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
ssh-keygen -o -a 100 -t ed25519 -C "bekbulatov.ramzan@ya.ru" -f ~/.ssh/id_ed25519 | |
# -o: Save the private-key using the new OpenSSH format rather than the PEM format. Actually, this option is implied when you specify the key type as ed25519. | |
# -a: It’s the numbers of KDF (Key Derivation Function) rounds. Higher numbers result in slower passphrase verification, increasing the resistance to brute-force password cracking should the private-key be stolen. | |
# -t: Specifies the type of key to create, in our case the Ed25519. | |
# -f: Specify the filename of the generated key file. If you want it to be discovered automatically by the SSH agent, it must be stored in the default `.ssh` directory within your home directory. | |
# -C: An option to specify a comment. It’s purely informational and can be anything. But it’s usually filled with <login>@<hostname> who generated the key. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment