Last active
May 1, 2019 20:21
-
-
Save gavinwilliams/abb3912334be5bc4426757b05c6e6dc5 to your computer and use it in GitHub Desktop.
Adds all SSH keys to your lastpass account. Make sure you install lpass CLI and login first.
This file contains hidden or 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
read "?Lastpass Folder (i.e. AWS/ include the trailing slash) " folder; for filename in ~/.ssh/*.pem; do printf "Private Key: $(cat $filename)" | lpass add $folder/$(basename $filename) --note-type=ssh-key --non-interactive; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment