News for hackers. Stuff that matters.
Re:How often should I rotate my SSH keys? by devwastaken on Friday February 26, 2021 @02:17AM (#26272137)
My concern with physical keys is what happens if it stops working?
Re:How often should I rotate my SSH keys? by darkr on Friday February 26, 2021 @04:54AM (#26273097)
Then that key can no longer be used. The solution to this resulting in being permanently locked out is to have more than n+1 redundancy in hardware, and ideally meatware too.
Re:How often should I rotate my SSH keys? by danielheath on Friday February 26, 2021 @02:20AM (#26272160)
You need two; one stowed safely and only retrieved to enroll a new service, and one to use day-to-day.
Re:How often should I rotate my SSH keys? by sneak on Friday February 26, 2021 @02:22AM (#26272169)
enroll a new service? we are talking about gpg smartcard usage, for ssh - not u2f 2fa.

you don't need the physical key to "enroll", you just keep a copy of its pubkey.

Re:How often should I rotate my SSH keys? by tmottabr on Friday February 26, 2021 @10:07AM (#26275453)
the idea is to generate the key in the device, so it never leave the device, therefore you cannot store it somewhere else like another device.

So, the ideia is for you to have two devices, each with its own key, the first device you use daily and the second you use store in a safe location.

if your first device in daily use stop working or is lost you use the second device you have stored to login to your systems to remove the keys from the lost device and add the keys for a new device that replace it and then store the second device back in a safe location.

Re:How often should I rotate my SSH keys? by sneak on Friday February 26, 2021 @02:20AM (#26272152)
I have one key permanently in a usb port of each computer, and one on my keychain as a backup (which is also used for U2F and has lightning so works with my phone for 2FA), so five in total, each with their own RSA key for ssh.
Re:How often should I rotate my SSH keys? by Ciantic on Friday February 26, 2021 @08:03AM (#26274339)
If you use GPG and YubiKey approach, you can create the keys in offline computer, store them to YubiKey, and make paper copy of the private key. Also you probably shouldn't have only single way to access the remote computer, I still intend to store password for root that I never use.

I wrote about my endeavour with this approach just few days ago [1].

[1]: https://github.com/Ciantic/thoughts/blob/master/2021/yubikey...

Re:How often should I rotate my SSH keys? by sneak on Friday February 26, 2021 @09:03AM (#26274818)
You should totally disable password authentication for SSH.
Re:How often should I rotate my SSH keys? by Ciantic on Friday February 26, 2021 @09:56AM (#26275354)
You are right, but you can still use password for recovery purposes even if it's not used for SSH authentication.

Most VPS provides "web console" access. It connects like terminal, like Digital Ocean's web-console that doesn't require SSH access [1].

[1]: https://www.digitalocean.com/docs/droplets/resources/console...

Re:How often should I rotate my SSH keys? by devoutsalsa on Friday February 26, 2021 @04:54AM (#26273101)
I'm more worried about simply losing it. I travel a lot.
Re:How often should I rotate my SSH keys? by GekkePrutser on Friday February 26, 2021 @05:21AM (#26273286)
Just use multiple. That's what I do.

As backup you can also use OpenPGP cards which cost much less than a yubikey. Or a cheaper Fido2 token if you use Fido2 for SSH access (I don't yet but it's coming into vogue). An OpenPGP card will cost about a tenner, you'll need a card reader to use it but for backup purposes it's perfect.

Re:How often should I rotate my SSH keys? by GoblinSlayer on Friday February 26, 2021 @05:58AM (#26273516)
Have a higher security fallback.