Keep passphrases for your locally present private keys in Bitwarden and add them to ssh-agent with one command
Securing ssh keys with password manager (Bitwarden)
Maintaining multiple ssh keys
Frequent need for adding keys to ssh-agent
- Pure python (tested on 3.10)
- bitwarden/cli
- Create new folder in Bitwarden
- Create item with passphrase in bw's folder
- Copy
config.py.exampleasconfig.py - Obtain
folderIdof your folder through bitwardenw/clibw listcommand - Input
folderIdintoconfig.py - Create .csv file for bitwarden item to ssh key mapping
- Input path to csv into
config.py - Obtain
itemIDof your item through bitwarden/cli - Fill .csv with mapping in format:
itemId,path_to_key - Make the script executable using
chmod +x <name_of_script>
Bonus: Create symlink in /usr/bin for easier use (I use bwsshauth)
- Type
bwsshauth - Follow instructions