bitwarden-ssh-agent/README.md
modem7 22301952b7
Update README.md
Documenting command line overrides to make it easier for users to see, understand and use.
2022-04-27 20:58:33 +01:00

29 lines
1.1 KiB
Markdown

# Bitwarden SSH Agent
## Requirements
* You need to have the [Bitwarden CLI tool](https://github.com/bitwarden/cli) installed and available in the `$PATH` as `bw`.
* `ssh-agent` must be running in the current session.
## What does it do?
Fetches SSH keys stored in Bitwarden vault and adds them to `ssh-agent`.
## How to use it
1. Run,
```shell
./bw_add_sshkeys.py
```
2. Enter your Bitwarden credentials, if a Bitwarden vault session is not already set.
3. (optional) Enter your SSH keys' passphrases.
## Storing the keys in BitWarden
1. Create a folder called `ssh-agent` (can be overridden on the command line).
2. Add an new secure note to that folder.
3. Upload the private key as an attachment.
4. Add the custom field `private` (can be overridden on the command line), containing the file name of the private key attachment.
5. Repeat steps 2-4 for each subsequent key
## Command line overrides
* `--debug`/`-d` - Show debug output
* `--foldername`/`-f` - Folder name to use to search for SSH keys _(default: ssh-agent)_
* `--customfield`/`-c` - Custom field name where private key filename is stored _(default: private)_