mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-06-16 05:13:54 -07:00
fix: update instructions for adding custom key path in ssh-keygen (#535)
This commit is contained in:
parent
9cbd248f4c
commit
8649e50afa
1 changed files with 21 additions and 0 deletions
|
|
@ -31,6 +31,18 @@ It is recommended to use one key per client. This means that if you access your
|
|||
> Enter file in which to save the key (/home/knut/.ssh/id_ed25519): [Press enter]
|
||||
```
|
||||
|
||||
If you see that `/home/knut/.ssh/id_ed25519 already exists`, follow these steps:
|
||||
|
||||
1. When prompted to overwrite the existing file, type <kbd>n</kbd> to choose not to overwrite.
|
||||
|
||||
2. Afterward, re-run the same command:
|
||||
|
||||
```shell
|
||||
ssh-keygen -t ed25519 -a 100
|
||||
```
|
||||
|
||||
3. This time, enter a new filepath when prompted (e.g., `~/.ssh/id_ed25519_codeberg`) to avoid overwriting the existing key.
|
||||
|
||||
4. You will be asked for a passphrase; enter one if you'd like, or leave the prompt empty.
|
||||
|
||||
Your private key can be protected by a passphrase. This adds a layer of authentication that increases security. Be aware that this will only be helpful for certain attack scenarios and does not offer 100% protection. It is recommended to keep your private key safe and - well - private.
|
||||
|
|
@ -95,6 +107,15 @@ Keep in mind that now, every time you wish to use Codeberg over SSH, you must ha
|
|||
|
||||
## Test the SSH connection
|
||||
|
||||
If you are using a custom path, add an entry in your `$HOME/.ssh/config` file:
|
||||
|
||||
```config
|
||||
Host codeberg.org
|
||||
HostName codeberg.org
|
||||
User git
|
||||
IdentityFile ~/.ssh/id_ed25519_codeberg
|
||||
```
|
||||
|
||||
Do this simple test:
|
||||
|
||||
```shell
|
||||
|
|
|
|||
Loading…
Reference in a new issue