Skip to content

Instantly share code, notes, and snippets.

@gavinwilliams
Last active May 1, 2019 20:21
Show Gist options
  • Save gavinwilliams/abb3912334be5bc4426757b05c6e6dc5 to your computer and use it in GitHub Desktop.
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.
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