Remix.run Logo
▲ lousken a day ago

Why would you upgrade from ed25519 ssh key? It is not used in encryption but for auth

For auth they are perfectly fine - it's like saying 17 character passwords are no longer good enough...

▲dist-epoch a day ago | parent | next [-]

A MITM intercepting your public ssh key can then authenticate as you if the curve is broken

▲wolvoleo a day ago | parent | next [-]

Yes true but in order to do that they first need to get to the point of being able to MITM and then break the server key to be able to identify as it.

I don't really see that happening on my stuff which is a very low value target.

▲what a day ago | parent | next [-]

They don’t need to MITM anything. The entire point of a public key is that it’s PUBLIC. Anyone can view the public keys you use on GitHub, for example.

▲wolvoleo a day ago | parent [-]

Only if you're storing those on github. I certainly don't.

I don't think SSH Auth keys are necessarily meant to be public. It uses asymmetric crypto and inherits the vocabulary. But keeping them private is a good mitigation.

▲dns_snek 19 hours ago | parent | next [-]

You don't use github over ssh?

Go to: https://github.com/USERNAME.keys

▲wolvoleo 15 hours ago | parent [-]

No I don't use github at all ever.

If I did I would use different keys than I'd use for my own servers though, I don't trust Microsoft at all.

▲SoftTalker a day ago | parent | prev | next [-]

Yes until (possibly) now SSH public keys were meant to be public.

▲ a day ago | parent | prev [-]
[deleted]
▲manbash a day ago | parent | prev [-]

If it's low value to you, then sure don't bother about encrypting your traffic.

▲wolvoleo a day ago | parent | next [-]

It's not even about encryption in this case, it's about authentication.

▲cromka a day ago | parent | prev [-]

That's false equivalency

▲what a day ago | parent | prev [-]

You don’t need a MITM. Your public key is PUBLIC. All the public keys for every GitHub user viewable, and not by accident.

▲wolvoleo a day ago | parent | prev [-]

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_ a day ago | parent | next [-]

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

▲noodletheworld a day 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 a day 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 a day ago | parent | prev | next [-]

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.

▲globular-toast 16 hours ago | parent | prev [-]

Almost everyone I know, including those who should know better, have a single SSH keypair they use for everything. People have laughed at me for generating a new keypair per service...

▲voakbasda 10 hours ago | parent [-]

Clearly those people that think they know better, don’t.

▲drum55 a day 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 a day 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 a day ago | parent | prev [-]

Please elaborate. What vulnerabilities?

▲drum55 a day 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.

▲wolvoleo 21 hours ago | parent | next [-]

You're acting like everyone who uses SSH uses GitHub.

▲elric 15 hours ago | parent [-]

The intersection of those two groups is very large. I don't understand what point you're trying to make?

▲cortesoft a day ago | parent | prev | next [-]

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

▲tveita 16 hours ago | parent | next [-]

Yes, but also ideally, GitHub shouldn't expose any information at all about people's private GitHub authentication setup, a behavior which has no good use and seems to surprise every person that learns about it.

▲drum55 a day ago | parent | prev [-]

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.

▲elric 15 hours ago | parent | next [-]

You should absolutely define them manually, otherwise you've just moved the problem from "anyone who looks at my github keys can fingerprint me" to "every server I connect to can fingerprint me".

My ssh config has many manually configured hosts with dedicated keys, and a bunch of wildcard groupings.

▲novafunc a day ago | parent | prev [-]

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.

▲drum55 a day ago | parent [-]

You don't need to do that, you can just specify a key for each host in your config.

Host dddd IdentityFile xxx

▲floralhangnail a day ago | parent [-]

> You don't need to do that, you can just specify a key for each host in your config. Host dddd IdentityFile xxx

Yes, but I believe if you connect to the server, and that key you specified fails, because you hadn't unlocked it yet or your ssh agent wasn't working right, that it just moves down the list and tries all the rest of your ssh keys unless you also have IdentitiesOnly yes set in your ~/.ssh/config. I also remember setting that line globally causes problems when using gvfs with file managers.

▲drum55 a day ago | parent [-]

If they are defined for the host as I showed, they aren't searched and presented. You a test this with ssh -vv, look for the line with "explicit" in it, and there will only be one.

debug1: Will attempt key: xxxx ED25519 SHA256:xxx explicit

▲floralhangnail a day ago | parent [-]

Interesting. IdentityFile "/home/redacted/.ssh/yubikey-1" for that host, and when I unplug my yubikey to force failure, I get "Will attempt key" for all of the keys in ~/.ssh/ What distro are you using?

▲drum55 a day ago | parent [-]

Interesting, I haven't seen that before. I'm using OpenSSH_10.3p1, LibreSSL 3.3.6 on OSX.

▲floralhangnail a day ago | parent [-]

Might be something funny with my agent, time for a deep dive.

▲mscdex a day ago | parent | prev [-]

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 a day 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 a day 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.

▲drum55 a day ago | parent [-]

It would break the client, they would be asked for every key password sequentially.