f4d7dd2bf0
Fix for already set SSH_ASKPASS env var |
||
---|---|---|
.gitignore | ||
bw_add_sshkeys.py | ||
LICENSE | ||
README.md |
Bitwarden SSH Agent
Requirements
- You need to have the Bitwarden CLI tool installed and available in the
$PATH
asbw
. 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
- Run,
./bw_add_sshkeys.py
- Enter your Bitwarden credentials, if a Bitwarden vault session is not already set.
- (optional) Enter your SSH keys' passphrases if they're not stored in your Bitwarden.
Storing the keys in BitWarden
- Create a folder called
ssh-agent
(can be overridden on the command line). - Add an new secure note to that folder.
- Upload the private key as an attachment.
- Add the custom field
private
(can be overridden on the command line), containing the file name of the private key attachment. - (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) - Repeat steps 2-5 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)--passphrasefield
/-p
- Custom field name where passphrase for the key is stored (default: passphrase)