Re:SSH keys stolen by stream of malicious PyPI and NPM packages
by judofyr on Sunday December 10, 2023 @03:50PM
(#38594908)
Generate a separate SSH key which is only stored in your offsite backup (and then also encrypted with a password), and not on any of your physical machines.
[ Parent
| on HN ]
Re:SSH keys stolen by stream of malicious PyPI and NPM packages
by fbdab103 on Sunday December 10, 2023 @04:35PM
(#38595286)
I must be missing something. If this novel key only exists inside my backups, it is not registered with any external services, and it cannot be used in the event the primary key is lost.
For me to register the backup-only key with other services, it would have to live on my machine, and be simultaneously registered in addition to the primary key. I am not sure what I am gaining vs having a backup of the primary key other than increased operational burden.
Re:SSH keys stolen by stream of malicious PyPI and NPM packages
by vladvasiliu on Sunday December 10, 2023 @05:43PM
(#38595791)
You can keep just the public part of the backup key on your current device and always enroll the two keys at a time.
But yeah, if the main device is stolen, it can be a pain to go update all the services with the new device’s key.
I personally use the gpg app on my youbikey for this, and the secret key comes from a backup I install on a livecd.
Re:SSH keys stolen by stream of malicious PyPI and NPM packages
by fbdab103 on Monday December 11, 2023 @07:56PM
(#38607726)
Ah duh, keep the public part on the device.
However, that very quickly gets into the problem of untested backups. I am then relying completely upon a private key which has never been validated to work.