2018-11-04 17:32:55 +01:00
|
|
|
# ssh-agent
|
|
|
|
|
2018-11-23 06:12:40 +01:00
|
|
|
[SSH][ssh] is used to connect to remote machines. I use a systemd service to manage ssh-agent.
|
2018-11-04 17:32:55 +01:00
|
|
|
|
2018-11-23 06:12:40 +01:00
|
|
|
## Use Cases
|
2018-11-04 17:32:55 +01:00
|
|
|
|
2018-11-23 06:12:40 +01:00
|
|
|
ssh-agent can be used to:
|
2018-11-04 17:32:55 +01:00
|
|
|
|
2018-11-23 06:12:40 +01:00
|
|
|
- Hold private keys
|
2018-11-04 17:32:55 +01:00
|
|
|
|
2018-11-23 06:12:40 +01:00
|
|
|
You should not use ssh-agent if:
|
|
|
|
|
|
|
|
- You don't set a passphrase on your SSH keys
|
2018-11-04 17:32:55 +01:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```sh
|
|
|
|
systemctl --user enable --now ssh-agent.service
|
|
|
|
```
|
|
|
|
|
2018-11-23 06:12:40 +01:00
|
|
|
In order for ssh-agent to cache your keys, you must first add them with `ssh-add` or use `AddKeysToAgent Yes` in your `~/.ssh/config`
|
2018-11-04 17:32:55 +01:00
|
|
|
|
2018-11-23 06:12:40 +01:00
|
|
|
[ssh]: https://www.archlinux.org/packages/core/x86_64/openssh/
|