Skip to content

Kairixir/setup-ssh-agent-bitwarden

Repository files navigation

bwsshauth

Keep passphrases for your locally present private keys in Bitwarden and add them to ssh-agent with one command

Motivation

Securing ssh keys with password manager (Bitwarden)

Use case

Maintaining multiple ssh keys
Frequent need for adding keys to ssh-agent

Dependencies

Setup

  1. Create new folder in Bitwarden
  2. Create item with passphrase in bw's folder
  3. Copy config.py.example as config.py
  4. Obtain folderId of your folder through bitwardenw/cli bw list command
  5. Input folderId into config.py
  6. Create .csv file for bitwarden item to ssh key mapping
  7. Input path to csv into config.py
  8. Obtain itemID of your item through bitwarden/cli
  9. Fill .csv with mapping in format: itemId,path_to_key
  10. Make the script executable using chmod +x <name_of_script>

Bonus: Create symlink in /usr/bin for easier use (I use bwsshauth)

Usage

  1. Type bwsshauth
  2. Follow instructions

About

Setup ssh-agent keys using bitwarden

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages