Remix.run Logo
▲ wolvoleo 2 hours ago

Yes, as the attacker normally won't have the public part of the key pair, they have nothing to crack.

I would stop publishing them on eg GitHub etc but I've never done that anyway.

▲sva_ 2 hours ago | parent | next [-]

Hope you don't use ssh-agent (I don't)

▲noodletheworld 2 hours ago | parent | prev | next [-]

It depends; you don't reuse ssh keys right? That would be lazy and bad.

If you did for example, use the same key for github and login, anyone could access your public keys on this unauthenticated url:

https://github.com/yourname.keys

▲nixosbestos 2 hours ago | parent | next [-]

I have a hard time seeing this sub-thread conversation as viable or worth anyone's time. If some people think hiding a pubkey is their salvation out of this, I don't see any point in engaging.

▲wolvoleo 2 hours ago | parent | prev [-]

I don't use github at all. And not much cloud. I'm not a dev, I only use my keys on my own servers.

▲drum55 2 hours ago | parent | prev [-]

Github has always published all keys for all users though, it's the source of some really stupid vulnerabilities that they seem to think "public key" means "should be public".

▲dunham 2 hours ago | parent | next [-]

"tangled.org" also publishes public keys in ATProto (that might be necessary to coordinate with storage servers). I've dropped my p256 key. It's not yet clear to me if ed25519 has be weakened or not.

▲ninkendo 2 hours ago | parent | prev [-]

Please elaborate. What vulnerabilities?

▲drum55 2 hours ago | parent [-]

You can discover what SSH servers are owned by what people by abusing GitHub. They publish the public keys, you have a target SSH server and you send the hashes of the keys you scraped to the server, it tells you which GitHub user has access there. Reverse way, you have a targets keys and you send them to every SSH server on IPv4, and it tells you what servers they own. This is because SSH supports just telling you if a hash of a public key would give you access to an account, meaning you don't need to enter the password for all keys in ~/.ssh sequentially for every server.

▲mscdex 43 minutes ago | parent | next [-]

As an SSH server, there's nothing stopping you from always rejecting (or always allowing) those public key checks and only doing any work when sent the full public key authentication request (with the signature).

▲drum55 33 minutes ago | parent [-]

The software doesn’t do that now though, at least openssh doesn’t. It would break a lot of people’s setups to change that assumption out of the blue.

▲mscdex 25 minutes ago | parent [-]

If you accepted all public key checks it shouldn't break anything. It's just an optimization for the client as the server needs to handle full public key authentication requests anyway.

Besides, there are additional (server-side) safeguards to prevent someone from doing these sorts of mass public key checks using anyone's public key, including (but not limited to) IP whitelisting and port knocking.

▲cortesoft an hour ago | parent | prev [-]

Ideally, you should be using a unique key for every service.

▲drum55 an hour ago | parent [-]

Yes you should, it's a little fiddly because SSH supports a maximum of 11 keys before you need to manually define them for each connection.

It's an another attack vector too though, if you SSH to my server you send me all of your public keys in ~/.ssh by default (or at least the hashes of them), and I can compare them to GitHub to find out your real identify. Github is just making this trivial by needlessly exposing them.

▲novafunc a minute ago | parent [-]

I made a script that accidentally solves that problem.

The script can change the active identity file by commenting out all the other ones listed. I also have multiple git config files, and it creates a symlink to the active version. And it does all that without me having to restart my terminal session or anything weird, just instant.

It's nice because it lets me separate my personal identity and dumb username identity. And it could be used to use different keys for different services.