-
Notifications
You must be signed in to change notification settings - Fork 61.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use ed25519 keys instead of rsa keys (#362)
* use ed25519 keys instead of rsa keys RSA keys are outdated. Even by using larger 4096 keys maybe it's best to move away from rsa keys altogether. This PR updates the document to suggest using ed25519 keys which, at this time, defaults to a 16 round key deviation function. It may be useful to suggest more rounds for the KDF but that's for a different PR. --timball * Add RSA fallback and change id_rsa to id_ed25519 Co-authored-by: hubwriter <[email protected]> Co-authored-by: hubwriter <[email protected]>
- Loading branch information
1 parent
354d8c2
commit 079c229
Showing
1 changed file
with
16 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,34 +20,42 @@ If you don't want to reenter your passphrase every time you use your SSH key, yo | |
{% data reusables.command_line.open_the_multi_os_terminal %} | ||
2. Paste the text below, substituting in your {% data variables.product.product_name %} email address. | ||
```shell | ||
$ ssh-keygen -t rsa -b 4096 -C "<em>[email protected]</em>" | ||
$ ssh-keygen -t ed25519 -C "<em>[email protected]</em>" | ||
``` | ||
{% note %} | ||
|
||
**Note:** If you are using a legacy system that doesn't support the Ed25519 algorithm, use: | ||
```shell | ||
$ ssh-keygen -t rsa -b 4096 -C "[email protected]" | ||
``` | ||
|
||
{% endnote %} | ||
This creates a new ssh key, using the provided email as a label. | ||
```shell | ||
> Generating public/private rsa key pair. | ||
> Generating public/private ed25519 key pair. | ||
``` | ||
3. When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location. | ||
|
||
{% mac %} | ||
|
||
```shell | ||
> Enter a file in which to save the key (/Users/<em>you</em>/.ssh/id_rsa): <em>[Press enter]</em> | ||
> Enter a file in which to save the key (/Users/<em>you</em>/.ssh/id_ed25519): <em>[Press enter]</em> | ||
``` | ||
|
||
{% endmac %} | ||
|
||
{% windows %} | ||
|
||
```shell | ||
> Enter a file in which to save the key (/c/Users/<em>you</em>/.ssh/id_rsa):<em>[Press enter]</em> | ||
> Enter a file in which to save the key (/c/Users/<em>you</em>/.ssh/id_ed25519):<em>[Press enter]</em> | ||
``` | ||
|
||
{% endwindows %} | ||
|
||
{% linux %} | ||
|
||
```shell | ||
> Enter a file in which to save the key (/home/<em>you</em>/.ssh/id_rsa): <em>[Press enter]</em> | ||
> Enter a file in which to save the key (/home/<em>you</em>/.ssh/id_ed25519): <em>[Press enter]</em> | ||
``` | ||
|
||
{% endlinux %} | ||
|
@@ -81,18 +89,18 @@ Before adding a new SSH key to the ssh-agent to manage your keys, you should hav | |
$ touch ~/.ssh/config | ||
``` | ||
* Open your `~/.ssh/config` file, then modify the file, replacing ` ~/.ssh/id_rsa` if you are not using the default location and name for your `id_rsa` key. | ||
* Open your `~/.ssh/config` file, then modify the file, replacing ` ~/.ssh/id_ed25519` if you are not using the default location and name for your `id_ed25519` key. | ||
``` | ||
Host * | ||
AddKeysToAgent yes | ||
UseKeychain yes | ||
IdentityFile ~/.ssh/id_rsa | ||
IdentityFile ~/.ssh/id_ed25519 | ||
``` | ||
3. Add your SSH private key to the ssh-agent and store your passphrase in the keychain. {% data reusables.ssh.add-ssh-key-to-ssh-agent %} | ||
```shell | ||
$ ssh-add -K ~/.ssh/id_rsa | ||
$ ssh-add -K ~/.ssh/id_ed25519 | ||
``` | ||
{% note %} | ||
|
This comment was marked as spam.
Sorry, something went wrong.