5 ms·
Do not give out your private keys anywhere except where they're needed. They are meant to be private for a reason. If this service was serious, it'd instead re
by ignoramous 1y ago
Do not give out your private keys anywhere except where they're needed. They are meant to be private for a reason.
If this service was serious, it'd instead rely on fingerprints (sha256/sha512) and not the key itself.
- mr_toad 1y agoIs there any case where they ever need to be shared? If you need a login, generate a new one.
- chrisweekly 1y agoYeah, I'd strike "except where they're needed". Never share a private key.
- IgorPartola 1y agoOne of the best things you can do is generate a key per device, not per person. That way if you lose your phone you just revoke that key and not the one that you use on your tablet, work laptop, home desktop, etc. Bonus points: monkeysphere and certificate based auth are two other great solutions for making sure the ssh server you log into is not doing a MITM on initial connection (you know, the part where it asks you to manually verify the fingerprint of the server key and you likely just hit y instead). Forwarding your ssh agent to a host that you don’t know for certain is not doing a MITM attack on you can be devastating, as is entering a password into same.
- munchler 1y agoBut that way you can only use each key on that one device. E.g. No starting a private conversation on your phone and then continuing it on your desktop later.
- IgorPartola 1y agoThe service you use should allow you to add more than one key and create a symmetric encryption key for the conversion. Your private key identifies your device, the service should know that you own multiple devices.
- msgodel 1y agoAre there really people who don't do this? Copying private keys around just feels gross like copying binaries around.
- nisegami 1y agoMy company's system admins don't know how to do that unfortunately.
- bornfreddy 1y agoNo worries, I'm sure there are lots of webpages that will generate private keys for them. For free.
- hinkley 1y agoThere is not. I worked on a code signing project, and there was this guy who I as already warned had a bit of Dunning Kruger going on, but would later discover was also a bit of an ineffectual bully as well, when he got into an argument with both me and a customer. Not long after the first milestone of a project with lots of milestones he announced he intended to have me to generate ‘real’ keys for the project and send him the key pairs over Outlook Encryption. For a project with public safety concerns written all over it, and would later have me pick multiple Hardware Security Modules for different steps of a multi-signature chaining process. He tried to get me into trouble for telling him, politely, that he could fuck right off. And then had to talk to everyone he tried to tattle to about why he was a dumbass and that we were at least a year (turned out to be three) before we needed “real” keys - we were actually about four months from even needing fake keys for integration testing, let alone real keys. And I was be writing up runbooks for doing that rather than doing it for people. The thing I would soon discover about signing keys is that everyone thinks they are a magic incantation of math. They’re just math. The magic is not inside the box, the magic is the box. It’s like a clean room: It’s a room full of nothing. What makes it special is all the work you do trying to prevent something from happening to it. I stayed on that project almost a year past where there was any code they needed me to write (except for one bad bug I would find in my code a few months later), but they still needed me to teach them behavior, to lock in that clean room mindset.
- uniqueusername7 1y agoHow would I get my ssh keys to the remote server from a new machine? To me, the easiest way seems to be either sharing private keys from a different machine, or having some way to deterministically generate keys from a password or keyphrase, and the latter seems more secure to me because I don't have to trust a middle man to do the transferring.
- mr_toad 1y agoGenerate a new private/public key pair on the new machine and then copy the public key (from the new machine) into the authorised keys (on the server) using a login that already has access (e.g. from the old machine).
- mightysashiman 1y agoWouldn't it being making the matter worse? You wouldn't know if it's a collision of the hash or of the keys themselves
- nativeit 1y agoAssuming for the sake of argument this were a real service checking for matches, the chances of a hash collision with SHA256 is effectively 0.[1] I entered the limit for BIGINT (9223372036854775807), and the approximation of the probability of a hash collision after generating 9223372036854775807 items in SHA256 is zero. The exact probability would probably take eons to calculate, but it's vanishingly close to zero. 1. https://kevingal.com/apps/collision.html https://kevingal.com/apps/collision.html
- goopypoop 1y ago"Never unless necessary" is unhelpful for anything
- FearNotDaniel 1y agoYeah reminds me of the time a real UK bank employee insisted that I should give him an SMS onetime code, even telling me to ignore the part of the message that I should never give the code to anyone else, not even a bank employee. I verified by other means that both he and the transaction were genuine but absolutely refused to give him that code no matter how he tried to spin it, and solved the issue a different way. Whatever manager created that ad hoc process needs to get fired.
- gblargg 1y agoScammer: your private key is needed. Oh, OK.