OpenSSH Post-Quantum Cryptography
OpenSSH supports a figure of cryptographic key accord algorithms considered to be harmless against attacks from quantum computers. We propose that all SSH connections use these algorithms.
OpenSSH has offered post-quantum key accord (KexAlgorithms) by default since publish 9.0 (April 2022), initially via the sntrup761x25519-sha512 algorithm. More recently, in OpenSSH 9.9, we have added a second post-quantum key accord mlkem768x25519-sha256 and it was made the new default scheme in OpenSSH 10.0 (April 2025).
To advance immigration to these stronger algorithms, OpenSSH 10.1 volition warn the person whenever a non post-quantum key accord scheme is selected, alongside the following message:
** WARNING: association is not using a post-quantum key toggle algorithm. ** This meeting may be susceptible to "store now, decrypt later" attacks. ** The server may need to be upgraded. See https://openssh.com/pq.html
This alert is displayed by default but may be impaired via the WarnWeakCrypto choice in ssh_config(5).
Background
A quantum device (QC) is a equipment capable of performing computations with data encoded as quantum states. Such a equipment could quickly solve particular problems that are intractable for existing "classical" computers.
The math that underpin a figure of cryptographic algorithms are among the problems that quantum computers are believed to be capable to effectively solve. This method that a sufficiently-powerful quantum computer (a.k.a a "cryptographically-relevant" quantum computer) volition be capable to break them. Most affected is the cryptography used for key accord and digital signatures, the two of which perform crucial roles in SSH.
Fortunately, quantum computers of adequate power to interrupt cryptography have not been invented yet. Estimates for whenever a cryptographically-relevant quantum device volition arrive, according to the charge of advancement in the field, range from 5-20 years, alongside many observers expecting them to arrive in the mid-2030s.
The complete privacy of an SSH association depends on cryptographic key agreement. If an attacker can interrupt the key accord afterward they are capable to decrypt and view the complete session. The attacker need not execute this assault in real time; they may collect encrypted SSH sessions now and afterward decrypt them later once they have admission to a quantum computer. This is referred to as a "store now, decrypt later" assault (also as "harvest now, decrypt later").
Fortunately, improved "post-quantum" cryptographic algorithms have been devised that depend on distinct underlying mathematical problems that are understood to not be attackable by a quantum computer.
OpenSSH has supported post-quantum key accord to forestall "store now, decrypt later" attacks for multiple years and it has been the default since OpenSSH-9.0, released in 2022.
FAQ
I received a alert from ssh that directed me to this page. What should I do? As mentioned above, OpenSSH 10.1 started alert users whenever connections use cryptography that is not harmless against quantum computers. If you received such a warning, it method that the server you connected to did not recommendation one of the two post-quantum key accord algorithms that are being standardised for the SSH protocol: mlkem768x25519-sha256 and sntrup761x25519-sha512The ideal resolution is to update the server to use an SSH implementation that supports at smallest one of these. OpenSSH versions 9.0 and greater support sntrup761x25519-sha512 and versions 9.9 and greater support mlkem768x25519-sha256. If your server is already operating one of these versions, afterward inspect whether the KexAlgorithms choice has disabled their use.
If you are unable to update the server and/or you favor to obtain the risk of continuing to use quantum-unsafe cryptography afterward the alert may be silenced via the WarnWeakCrypto choice in ssh_config(5). We propose doing this selectively, for example:
Match presenter unsafe.example.com WarnWeakCrypto no-pq-kexQuantum computers don't be yet, why go to all this trouble? Because of the "store now, decrypt later" assault mentioned above. Traffic sent today is at hazard of decryption unless post-quantum key accord is used. What concerning signature algorithms? You stated they were at hazard too Yes, most currently-used signature algorithms (including RSA and ECDSA) can be broken by a quantum computer. However, there is no hazard to existing traffic in this circumstance (i.e. there is no akin "store now, decrypt later"). The lone urgency for signature algorithms is ensuring that all classical signature keys are former ongoing of cryptographically-relevant computers becoming a reality. OpenSSH volition add assistance for post-quantum signature algorithms in the future. I don't accept we'll always get quantum computers. This is a discarded of time Some group regard the project of scaling existing quantum computers up to the point anywhere they can tackle cryptographic problems to be practically insurmountable. This is a possibility. However, it appears that most of the barriers to a cryptographically-relevant quantum device are engineering challenges fairly than underlying physics.
If we're correct concerning quantum computers being practical, afterward we volition have protected huge quantities of person data. If we're incorrect concerning it, afterward all we'll have done is moved to cryptographic algorithms alongside stronger mathematical underpinnings.
These post-quantum algorithms are new. Are we certain they aren't broken? We're wary of this too. Though post-quantum key accord algorithms have received a lot of concerted cryptographic notice complete the final few years, it's imaginable that new attacks power be found.To defend against this happening we have selected post-quantum algorithms with good safety margins. This method that equal if they rotate out to be weaker than expected they are motionless apt to be powerful adequate to be considered fit for purpose.
Additionally, all the post-quantum algorithms implemented by OpenSSH are "hybrids" that merge a post-quantum algorithm alongside a classical algorithm. For example mlkem768x25519-sha256 combines ML-KEM, a post-quantum key accord scheme, alongside ECDH/x25519, a traditional key agreement algorithm that was formerly OpenSSH's preferred default. This ensures that the combined, hybrid algorithm is no worse than the former best classical algorithm, equal if the post-quantum algorithm turns out to be completely damaged by forthcoming cryptanalysis.