Cleanup README

This commit is contained in:
Pavel Panteleev 2022-04-27 14:26:14 +04:00
parent ff5258af6a
commit dee9911ba7
2 changed files with 3 additions and 4 deletions

View file

@ -3,7 +3,6 @@
## 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.
* Optional: `paramiko` must be installed to decrypt keys. If none of your keys are encrypted, `paramiko` is not needed
## What does it do?
Fetches SSH keys stored in Bitwarden vault and adds them to `ssh-agent`.
@ -14,7 +13,7 @@ Fetches SSH keys stored in Bitwarden vault and adds them to `ssh-agent`.
./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.
3. (optional) Enter your SSH keys' passphrases if they're not stored in your Bitwarden.
## Storing the keys in BitWarden
@ -22,5 +21,5 @@ Fetches SSH keys stored in Bitwarden vault and adds them to `ssh-agent`.
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. Optional: If your key is encrypted with passphrase and you want it to decrypt automatically, save passphrase into custom field `passphrase` (field name can be overriden on the command line)
5. (optional) If your key is encrypted with passphrase and you want it to decrypt automatically, save passphrase into custom field `passphrase` (field name can be overriden on the command line)
6. Repeat steps 2-6 for each subsequent key

View file

@ -218,7 +218,7 @@ def ssh_add(session: str, item_id: str, key_id: str, key_pw: str) -> None:
ssh_key = proc_attachment.stdout
if key_pw:
envdict = dict(os.environ, DISPLAY="1", SSH_ASKPASS=os.path.realpath(__file__), SSH_KEY_PASSPHRASE=key_pw)
envdict = dict(os.environ, SSH_ASKPASS=os.path.realpath(__file__), SSH_KEY_PASSPHRASE=key_pw)
else:
envdict = dict(os.environ, SSH_ASKPASS_REQUIRE="never")