Over the last few weeks three different stories about SSH and artificial intelligence have got mixed up, and the result is a growing belief that SSH keys can no longer be trusted. That is not the case: neither RSA nor Ed25519 is broken. But in all the noise there are a couple of things worth knowing, and a good excuse to review the keys you use to log in to your servers.
Three SSH and AI stories that got mixed up
The *sshole bug: found with AI, but it breaks no keys
In early November CVE-2026-123158 was published, an OpenSSH flaw nicknamed *sshole. It was found by Özgün Kültekin, of the company Wakefield, using swarms of AI agents that ran some 17,600 unusual login attempts against servers built in different ways. He reported it to OpenSSH on 3 November and the fix shipped two days later, in version 10.6p2.
The bug is a curious one. On distributions that use the musl library instead of glibc (Alpine Linux is the best known), the function that checks passwords returns a single asterisk when something goes wrong, for example with a password longer than 256 characters. And on those systems an asterisk is exactly what is stored for accounts without a password, such as root on Alpine or accounts that only log in with a key. The server compares “*” with “*”, finds they match and lets you in.
The first attack attempts came less than nine hours after it was made public. Still, several things have to be true at once: musl, a server that checks passwords without PAM, and password login turned on, which is what OpenSSH does by default. Ubuntu, Debian, Red Hat, Fedora, macOS and Windows are not affected. Above all, it has nothing to do with RSA or Ed25519 keys: it is a password login bug.
The rumor that an AI has broken RSA-2048
On 28 November someone posted on X that rumors were still going around that one of the big AI labs had managed to break 2048-bit RSA. The next day Elon Musk replied: “I’ve heard this from a few people.” He did not say which lab or show anything.
So far nobody has published a factored 2048-bit key, a paper or any code. The only concrete development is that 21 cryptographers, including Dan Boneh and Matthew Green, have formed a group to review any result that appears and coordinate how it is disclosed. That is preparing just in case, not confirming anything.
The record that is real: RSA-896
Here is what did happen. On 19 September Steve Weis, an engineer at Anthropic, published the factorization of RSA-896, a 270-digit number from the old RSA factoring challenge and the largest ever broken in public. Claude ported an existing free program (CADO-NFS) to graphics cards and ran the computation: up to 2,048 GPUs using their idle time over ten days, about 30 GPU-years in total. Two weeks earlier another team had done the same with RSA-260, at 862 bits, also with an AI agent.
There is no new mathematical shortcut here: it is the usual method with far more hardware. Weis himself is clear about it: it does not affect the RSA-2048 keys in use today, but it shows that 1024-bit keys are now within reach of anyone with a data center full of GPUs.
What would happen to SSH if RSA fell tomorrow
Even if the rumor were true, the damage to SSH would be more limited than it seems. In SSH, RSA or Ed25519 keys are only used to prove who you are (and who the server is). The conversation is encrypted by something else: a key exchange negotiated on every connection which, in OpenSSH, is already hybrid and resistant to quantum computers, by default since version 9.0 and with ML-KEM since 10.0.
So nobody could decrypt old sessions they have recorded. The risk would be a different one: someone forging a signature with your RSA key to get into your servers, or pretending to be one of them. Ed25519 is not affected by that, because it does not rely on factoring numbers but on elliptic curves.
RSA vs Ed25519 SSH keys: what really changes
Many people say Ed25519 is “more secure”. In fact, a 3072-bit RSA key and an Ed25519 key offer the same level of security, about 128 bits. The differences lie elsewhere:
| RSA | Ed25519 | |
|---|---|---|
| Security level | About 80 bits with 1024 (no longer enough), 112 with 2048 and 128 with 3072 | About 128 bits, always |
| Key size | You have to choose it, and you can choose badly | Fixed, nothing to configure |
Line in authorized_keys | About 560 characters with 3072 bits | About 90 characters |
| If someone improves factoring | Affected | Not affected |
| Quantum computer | Does not resist | Does not resist either |
| Compatibility | Any system, including very old ones | OpenSSH 6.5 (2014) or later, GitHub, GitLab and almost every cloud |
The speed argument you often hear is only half true: RSA is slow at generating keys and signing, but very fast at verifying. In a normal login you will not notice any difference.
The real advantage of Ed25519 is that it is hard to get wrong. RSA has had serious failures because of how keys were generated, not because of the maths: the weak Debian keys of 2008, or the Infineon chips that in 2017 were producing easy-to-break keys. And there are still servers with 1024-bit keys that someone created fifteen years ago. With Ed25519 there is no size to choose and no parameters to get wrong. That is why, since OpenSSH 9.5, it is what ssh-keygen creates if you do not tell it otherwise.
One detail that confuses a lot of people: when OpenSSH 8.8 “disabled ssh-rsa” in 2021, it did not disable RSA keys. It disabled an old way of signing with them, the one that uses SHA-1. The same key keeps working and signs with SHA-256 or SHA-512 without you doing anything. Only very old servers and programs that do not know those newer signatures fail.
What really protects your SSH access (and it is not the algorithm)
An Ed25519 key without a passphrase is easier to abuse than an RSA key with one. If someone copies your private key file (malware, a backup that ends up in the wrong place, a stolen laptop), with a passphrase-less Ed25519 key they are into all your servers at once. With a passphrase, they also have to guess it. The algorithm matters less than three habits:
- Always put a passphrase on the private key, and use an agent (ssh-agent or the Mac keychain) so you do not have to type it on every connection.
- Turn off password login on the server. The *sshole case shows why: the exposed accounts were precisely the ones with no password that only logged in with a key, because the server was still accepting passwords in general.
- Keep
authorized_keysclean. Creating a new key protects nothing if the old one is still authorized on the server. Any line you cannot identify, remove it.
Frequently asked questions about SSH keys, RSA and Ed25519
Is the RSA algorithm used by SSH broken?
No. Nobody has publicly broken an RSA key of 2048 bits or more; the record is RSA-896, from September. What has been retired since 2021 is “ssh-rsa”, the signature with SHA-1. Your RSA key keeps working with SHA-2 signatures.
Has artificial intelligence broken SSH keys?
No. AI has helped find an OpenSSH bug (*sshole), which affects password login on musl systems, and set the factoring record with RSA-896. The RSA-2048 story is a rumor with no evidence.
Is an Ed25519 key more secure than an RSA key?
Compared with a 3072 or 4096-bit RSA key, the security level is the same. Ed25519 wins because it cannot be misconfigured and would not be affected by an advance in factoring. Compared with a 1024-bit RSA key, yes, by a long way.
What RSA key size is still secure for SSH?
3072 bits or more. 2048 is still secure today, but NIST has already proposed retiring it from 2030. 1024-bit keys should be replaced now.
What is the OpenSSH *sshole bug and does it affect me on Ubuntu?
It is CVE-2026-123158: a flaw that let attackers into password-less accounts by typing a password longer than 256 characters. It only affects systems with musl and without PAM, such as Alpine, some OpenWrt devices with OpenSSH installed, or containers that run sshd. Ubuntu, Debian and Red Hat are not affected. The fix is to update to OpenSSH 10.6p2 or to your distribution’s patched package.
Are Ed25519 keys resistant to quantum computers?
No, just like RSA. But a quantum computer able to break them does not exist yet, and the part that encrypts your sessions is already post-quantum in current OpenSSH. When the time comes, login keys will be replaced by a new type; NIST has proposed 2035 as the date to retire RSA and elliptic curves.
Do I have to replace my RSA SSH keys now?
1024-bit keys, yes. Keys of 2048 bits or more are not urgent, but moving to Ed25519 takes ten minutes and takes the worry away. The important thing is to delete the RSA key from the server once you have replaced it.
Can I add a passphrase to an SSH key I already have?
Yes, without touching the servers: ssh-keygen -p -f ~/.ssh/id_ed25519. The key stays the same; only the way it is stored on your computer changes.
What is the difference between ssh-rsa and an RSA key?
“ssh-rsa” is the name of the key type and also of the old SHA-1 signature. The new signatures are called rsa-sha2-256 and rsa-sha2-512 and use the same key. That is why your .pub file still starts with “ssh-rsa” even though you sign with SHA-2.
Do Ed25519 keys work on GitHub, GitLab and in the cloud?
Yes. GitHub, GitLab, Hetzner, DigitalOcean and AWS (on Linux machines) accept them. Only very old equipment, the odd network device or servers with OpenSSH older than 2014 may cause problems.
Tutorial: how to create and use an Ed25519 SSH key on Linux, Mac and Windows
The steps are almost the same on all three systems, because all three ship with OpenSSH. Before you start, check which keys you already have:
ls ~/.ssh
If there is already an id_ed25519, do not overwrite it: either use it, or create the new one with a different name by adding -f ~/.ssh/id_ed25519_work.
How to create an Ed25519 key on Linux
1. Create the key.
ssh-keygen -t ed25519 -a 100 -C "home-laptop"
Accept the suggested path and, when it asks for a passphrase, set one. The -a 100 makes guessing that passphrase much slower if someone steals the file. The -C is just a label so you know which machine the key belongs to when you see it on a server.
2. Copy it to the server.
ssh-copy-id -i ~/.ssh/id_ed25519.pub user@server
3. Test it, forcing SSH to use only that key:
ssh -i ~/.ssh/id_ed25519 -o IdentitiesOnly=yes user@server
4. Load it into the agent so you do not have to type the passphrase every time. On Ubuntu with a desktop the system usually does it the first time you use the key; on a server or without a desktop:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
How to create an Ed25519 key on a Mac
1. Create the key from Terminal, just like on Linux:
ssh-keygen -t ed25519 -a 100 -C "macbook"
2. Store the passphrase in the macOS keychain. Open (or create) the file ~/.ssh/config and add:
Host *
UseKeychain yes
AddKeysToAgent yes
IdentityFile ~/.ssh/id_ed25519
Then run:
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
From then on, the Mac unlocks it by itself when you log in.
3. Copy it to the server. If you have ssh-copy-id, the same command as on Linux works. If not, this does the same thing:
cat ~/.ssh/id_ed25519.pub | ssh user@server "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
4. Test it with ssh user@server.
How to create an Ed25519 key on Windows 10 and 11
Windows has shipped OpenSSH since 2018. Open PowerShell and type ssh -V to check. If nothing answers, add “OpenSSH Client” from Optional features in Settings.
1. Create the key.
ssh-keygen -t ed25519 -a 100 -C "office-pc"
It is saved in C:\Users\YourUser\.ssh\id_ed25519.
2. Turn on the agent. Only the first time, in PowerShell opened as administrator:
Get-Service ssh-agent | Set-Service -StartupType Automatic
Start-Service ssh-agent
Then, as a normal user:
ssh-add $env:USERPROFILE\.ssh\id_ed25519
3. Copy it to the server. Windows does not have ssh-copy-id, but this does the same thing:
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh user@server "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
4. Test it with ssh user@server.
If you use PuTTY: open PuTTYgen, choose the “EdDSA” type with the “Ed25519” curve, press Generate and move the mouse. Set a passphrase and save the private key (.ppk). The line starting with ssh-ed25519, at the top of the window, is the one that goes into the server’s authorized_keys.
On the server: remove the RSA key and turn off password login
Do these steps with a session open and test each change from another terminal. If something goes wrong, the first session is still there to undo it.
1. Delete the old keys. Edit ~/.ssh/authorized_keys and remove the ssh-rsa lines you have replaced and any you cannot identify.
2. Turn off passwords. Create the file /etc/ssh/sshd_config.d/00-key-only.conf with this:
PasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin prohibit-password
The name starts with “00” on purpose: sshd keeps the first value it reads, and on many cloud servers there is another file (50-cloud-init.conf) that turns passwords back on.
3. Check and reload.
sudo sshd -t
sudo systemctl reload ssh
sudo sshd -T | grep -Ei 'passwordauthentication|kbdinteractive|permitrootlogin'
On Red Hat, Fedora and derivatives, the service is called sshd instead of ssh.
4. If you run Alpine (or Alpine-based containers with sshd), update because of *sshole:
apk upgrade -U -a
rc-service sshd restart
5. Optional, once nobody uses RSA any more: you can make the server accept only Ed25519 by adding this line to the same file:
PubkeyAcceptedAlgorithms ssh-ed25519,[email protected]
Careful: from that moment no RSA key will get in, including one used by a script or backup job you have forgotten about.
One step further: the key on a hardware token
If you have a YubiKey or another FIDO2 key, you can create the key with ssh-keygen -t ed25519-sk. The secret part never leaves the token, and you have to touch it to log in. You need OpenSSH 8.2 or later, both on your machine and on the server.
There is no need to throw any key away because of a rumor. But if you have been logging in with the same RSA key for years, this is a good moment to create an Ed25519 key with a passphrase, remove the keys you no longer need from the server and turn off password login. It takes ten minutes, and it protects you from the failures that actually happen, which are almost never in the maths.