This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
BITWARDEN_ENTRY_ID="TODO" # à remplir depuis `$ bw list items --search name_of_my_entry` | |
echo "🔒 getting ssh password from bitwarden" | |
bw get password ${BITWARDEN_ENTRY_ID} | pbcopy | |
echo "🔑 ssh password can be pasted for 10 seconds, from now" | |
(sleep 10; echo "🧹 clearing password"; echo -n '' | pbcopy)& |