From dee9911ba77e88eb7627dfd4688fef9859240dae Mon Sep 17 00:00:00 2001 From: Pavel Panteleev Date: Wed, 27 Apr 2022 14:26:14 +0400 Subject: [PATCH] Cleanup README --- README.md | 5 ++--- bw_add_sshkeys.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 37c2dec..249726d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/bw_add_sshkeys.py b/bw_add_sshkeys.py index 5a9ac94..8f6eac0 100755 --- a/bw_add_sshkeys.py +++ b/bw_add_sshkeys.py @@ -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")