omegion / ssh-manager

SSH Key Manager for 1Password, Bitwarden and AWS S3.
https://ssh-manager.omegion.dev
Apache License 2.0
246 stars 8 forks source link

Differentiate between handling public and private keys #113

Open PartTimeDataScientist opened 2 years ago

PartTimeDataScientist commented 2 years ago

I manage all my passwords in Bitwarden (in a self-hosted Vaultwarden instance) and really like the idea of storing SSH-keys there as well. As I don't always want to import both public and private keys I would like to see an option to define type to handle. This would allow to only retrieve public keys from Bitwarden on a new "server" as well as importing all the stored private keys on a new workstation.

I suggest to add the following four commands to work only with the respective keys (which are self explanatory about what they should do I hope) add-public --name --public-key add-private --name --private-key get-public --name get-private --name

A bonus command which would ease setting up new servers even further would be the following: import-public --name --target[-file] This command should retrieve only the public key (regardless if only a public-key or a public/private key pair is stored) from Bitwarden and append it to the given target-file

omegion commented 2 years ago

Hi! great ideas, it should be easy to implement. I will try to open a PR ASAP.