r/linuxadmin • u/sdns575 • Oct 29 '25
SSH key: rsa vs ed25519
Hi,
playing with Debian 13 and SSH, while troubleshooting why an ssh-key was not able to log into a machine (local and a test VM) after setting SSH loglevel to DEBUG3 I got a message "RSA key is not allowed". Well the problem I was troubleshooting was not related to RSA but a wrong permission on key path but searching on Internet I got this: https://www.openssh.org/txt/release-8.7 where is reported that rsa-sha2-256 and rsa-sha2-512 are enabled. Many suggest to use ED25519 because it is faster, shorter and have better security due complex alg.
At this point, I should update all my server SSH key to ED25519? Some server running Debian 11 with RSA. Running ssh-keygen -l -f keypath I receive something "4096 SHA256......" this should be ok if I'm not wrong.
Should I upgrade to ED25519?
Thank you in advance.
93
u/scottchiefbaker Oct 29 '25
It's 2025, defaulting to ed25519 for everything seems like good practice now. I consider RSA legacy, it's still works, but there are better alternatives.
21
u/deeseearr Oct 30 '25 edited Oct 30 '25
Okay... It's time for...
No, I can't give this speech again. I'll just try to sum it up.
The link you posted says that "OpenSSH will disable the ssh-rsa signature scheme by default in the next release". Note the phrase "Signature scheme". That refers to the algorithm which is used to sign data.
What it is not is a type of host key. Even though your SSH key is called "RSA", it is not "ssh-rsa". Those are two completely different things. Your RSA host keys have not been deprecated. Neither have the private and public keys you use instead of passwords, or any of the other keys. It's just one algorithm that is used to share them.
If you continue reading the OpenSSH patch notes, they even point out that this isn't a problem:
So, do you need to replace your host keys because SSH is deprecating RSA? No. Because it isn't. Really.
As long as you are using up-to-date software this isn't something that you should care about at all. Just keep using a modern client to connect to a modern server and even if you still have an old host key then nobody ever needs to know all the details about how it's all working. Even you.
Should you still be using RSA? The newer options are better, so unless you're stuck in an environment with weird embedded systems that can't be updated or weird embedded users who just can't be bothered to update (in which case the correct solution is to get rid of all of them, including the users), then I would suggest that any new keys use Edwards (ED-25519). There are enough issues with RSA in general that it's likely to go away before too long, but there's no rush to get rid of SSH host keys themselves. It's just the algorithms that are used to manipulate them that are being deprecated.
15
u/hijinks Oct 29 '25
if you are on 4096 for rsa there's almost no point to upgrade and seems like busy work. Now if you said it was 1024 from 20 years ago then yes.
5
u/The_Real_Grand_Nagus Oct 29 '25
RSA 4096 is good but elliptical curve algorithms are better and certainly better per bit. There is no urgency to update them all but when you create new ones, you should pick ED25519. That should be the default now.
That being said we are still using RSA on systems that require FIPS because for some reason ed 25519 hasn’t made its way into The allowed list yet.
4
u/upofadown Oct 30 '25
The link you posted was all about discontinuing the use of SHA1. Other than that, there didn't seem to be any preference expressed.
Well... The time required at the start of the connection is so short as to be not noticeable. The difference in length is a matter of a couple of hundred bytes. RSA is fairly simple; elliptic curves are significantly more complex.
I think at the admin level it doesn't really matter. You likely want to go for whatever gives you the best compatibility ... assuming there is any difference anymore.
2
u/shulemaker Oct 30 '25
There are some monitoring systems that use ssh checks every couple of minutes to run a custom script, that would use less cpu if they were Ed. You’d know if this was a problem.
1
u/Griznah Oct 30 '25
Ed25519 all the way!!
1
u/gtuminauskas Oct 31 '25
I have upgraded RSA keys to EC384/EC521 (elliptic curve) at the beginning of 2023.
With VMs is all good, accepts keys as usual.
The issue starts with network equipment or 3rd party online services, where they are kind of restricted to use RSA keys..
I would like to remove and destroy old RSA keys, but I am held back at the moment
1
u/AjPcWizLolDotJpeg Oct 31 '25
My org has just started using ED25519 and I think it's really cool, but there are tons of software that just doesn't support yet.
As fast as basic openssh it's all good, but if you run other software with SSH/SFTP integrations then you might notice some compatibility issues
1
u/Known_Experience_794 Nov 02 '25
I just finished a project on all my self-hosted, homelab, friends and family stuff. Just under 40 systems. Replaced all keys with ed25519 keys. Took a while but well worth it imo.