bw-ssh-uploader.sh | ||
bw-ssh.sh | ||
bwunlock.sh | ||
LICENSE | ||
README.md |
bitwarden-helper-scripts
These are just some helper scripts I put together to help when using the official Bitwarden CLI.
bwunlock.sh
Used to unlock a bitwarden vault and set the appropriate environment variables to keep the vault unlocked.
Usage Instructions
-
Copy the file to a location of your choosing, I use
/home/$USER/scripts
-
Set the following alias in your
~/.bashrc
:alias bw-unlock="source /home/$USER/scripts/bwunlock.sh"
-
Source your bashrc or close and re-open your shell
-
Run
bw-unlock
and imput your Bitwarden Master Password when prompted -
Run any Bitwarden command to ensure the script worked, like
bw list items
bw-ssh-uploader.sh
Used to upload a directory of ssh keys to bitwarden, placing public key in the note field, and private key as an attachment.
Usage Instructions
-
Copy the file to a location of your choosing, I use
/home/$USER/scripts
-
Mark it as executable
-
Run script like this:
/home/$USER/scripts/bw-ssh-uploader.sh /path/to/directory/of/keys $COLLECTIONID $ORGID
bw-ssh.sh
Used to fetch a private key from bitwarden, add it to ssh-agent, and login to a host
Usage Instructions
-
Copy the file to a location of your choosing, I use
/home/$USER/scripts
-
Mark it as executable
-
Run the script like this:
/home/$USER/scripts/bw-ssh.sh $KEYNAME $USERNAME $HOSTNAME