Mic92 / ssh-to-pgp

Convert SSH RSA keys to GPG keys
MIT License
22 stars 4 forks source link

Support configuring the user id #11

Closed ettom closed 1 year ago

ettom commented 2 years ago

Hi, this is a feature request to support configuration of the fields hardcoded here:

https://github.com/Mic92/ssh-to-pgp/blob/1ce63fee58e54a5133eccb12993588d46b3dfeab/convert.go#L44

The main idea is that, when managing multiple keys from different hosts, it's difficult to tell which key belongs to which host at a glance. For my use case it would be sufficient if localhost would default to the hostname of the current machine, but perhaps allowing some/all fields to be specified via command line arguments would be more extensible.

Mic92 commented 2 years ago

Patches are welcome. I don't think I will implement this myself since I mainly use ssh-to-age for new machines.

The code should be simple enough. You can start by adding a hostname here: https://github.com/Mic92/ssh-to-pgp/blob/main/main.go#L17

Mic92 commented 1 year ago

This was implemented.