2017-10-16 17:17:15 +01:00
|
|
|
# ssh-add
|
|
|
|
|
2024-02-14 20:25:13 +00:00
|
|
|
> Manage loaded SSH keys in the `ssh-agent`.
|
|
|
|
> Ensure that `ssh-agent` is up and running for the keys to be loaded in it.
|
2021-10-04 13:39:50 +01:00
|
|
|
> More information: <https://man.openbsd.org/ssh-add>.
|
2017-10-16 17:17:15 +01:00
|
|
|
|
2024-03-14 05:01:06 +00:00
|
|
|
- Add the default SSH keys in `~/.ssh` to the ssh-agent:
|
2017-10-17 16:34:37 +01:00
|
|
|
|
2017-10-17 16:21:51 +01:00
|
|
|
`ssh-add`
|
2017-10-16 17:17:15 +01:00
|
|
|
|
2017-10-18 08:13:09 +01:00
|
|
|
- Add a specific key to the ssh-agent:
|
2017-10-17 16:34:37 +01:00
|
|
|
|
2017-10-16 17:17:15 +01:00
|
|
|
`ssh-add {{path/to/private_key}}`
|
|
|
|
|
|
|
|
- List fingerprints of currently loaded keys:
|
|
|
|
|
|
|
|
`ssh-add -l`
|
|
|
|
|
|
|
|
- Delete a key from the ssh-agent:
|
|
|
|
|
|
|
|
`ssh-add -d {{path/to/private_key}}`
|
|
|
|
|
|
|
|
- Delete all currently loaded keys from the ssh-agent:
|
|
|
|
|
|
|
|
`ssh-add -D`
|
|
|
|
|
2017-10-17 16:21:51 +01:00
|
|
|
- Add a key to the ssh-agent and the keychain:
|
2017-10-16 17:17:15 +01:00
|
|
|
|
|
|
|
`ssh-add -K {{path/to/private_key}}`
|