What the SSH post-quantum key exchange warning means on an EC2 instance
If you saw the SSH post-quantum key exchange warning when you connected to an Amazon EC2 instance, the message means the SSH session did not negotiate a post-quantum hybrid key exchange. The session is still encrypted, but with classical algorithms only. The cloud administrator who runs the instance is the person who has to act, because the server side decides which key exchange algorithms are offered. Your own SSH client can only choose from what the instance advertises.
The fix depends on two things on the instance: the operating system release and the OpenSSH version. The AL2023 PQC guide describes a PQ subpolicy that, on an existing AL2023.12 or higher instance, enables ML-KEM hybrid key exchange in the LEGACY, DEFAULT, FUTURE or FIPS cryptographic policies. The AL2027 SSH configuration documentation says its default configuration lists mlkem768x25519-sha256, mlkem768nistp256-sha256 and mlkem1024nistp384-sha384 ahead of classical algorithms. Check the release with cat /etc/os-release and the OpenSSH version with ssh -V, then compare them against those documents.
On an AL2023 instance, confirm first whether the OpenSSH 9.9 rebase is installed. The AL2023 release notes for 2023.12.20260803 describe that rebase, and the AL2023 SSH server defaults page lists accepted key exchange algorithms with no ML-KEM entry, so an instance that has not taken the rebase or enabled the subpolicy will keep showing the warning. Run update-crypto-policies --show to see whether DEFAULT:PQ is active. Before you change anything, confirm that the instance is locked to its installed release, because the AL2023 deterministic upgrades page explains that a plain sudo dnf upgrade may find nothing to do. Read the release notes for side effects too, including the sshd-session split, the SetEnv first-match-wins behavior and the removal of DSA host keys, since automated jobs and other clients may depend on them. Confirm the steps and the change window with your platform or change-management team, and then reconnect to verify that the warning no longer appears.
Who has to act on an EC2 instance and what each can change
The SSH key exchange warning on an EC2 instance involves three parties with different controls: the person who administers the instance, the user who connects with an SSH client, and AWS. The instance administrator can change the operating system packages, the cryptographic policy and the SSH server configuration. The client user controls only the software on their own machine. Confirm which party owns each part of the connection before you change anything.
Instance administrator controls the server
The instance administrator owns the operating system, the SSH server and the choice of Amazon Machine Image (AMI). This person decides which Amazon Linux release runs on the instance and whether it has been upgraded. The administrator can run sudo dnf -y update, install crypto-policies-scripts, and apply the PQ subpolicy with sudo update-crypto-policies --set DEFAULT:PQ. Before you change anything, check which release the instance runs and whether it has taken the OpenSSH 9.9 rebase. The instance administrator is the party who can make the server offer a post-quantum key exchange, and the change applies to every client that connects to that instance.
Instance administrator edits SSH configuration
The administrator can also edit the SSH server configuration directly. On Amazon Linux 2027, the hardened defaults are in /etc/ssh/sshd_config.d/10-amazon-hardening.conf, and the default list already places ML-KEM hybrid algorithms ahead of classical ones. On Amazon Linux 2023, the default list of accepted key exchange algorithms has no ML-KEM entry, so the administrator must change the policy rather than only the list. Review any KexAlgorithms line you have added yourself, since an explicit list overrides the defaults. Note that OpenSSH 9.9 also changes how SetEnv is matched, so a configuration that worked before may need review after the upgrade.
Administrator controls the release and the upgrade
A new AL2023 instance is locked to its installed release, so a plain sudo dnf upgrade finds nothing to do. To move to the latest release, the administrator runs sudo dnf upgrade --releasever=latest, which also locks the system to that release, and the override file is /etc/dnf/vars/releasever. Check the OpenSSH package version with ssh -V and rpm -q openssh-server after the upgrade. Versions openssh-9.9p1-10.amzn2023.0.1 and openssh-9.9p1-10.amzn2023.0.2 are the builds named in the release notes, so confirm the build your instance reports matches one of them. The release lock is the most common reason the warning persists on an instance that appears up to date.
Client user controls only their own client
The person who connects to the instance controls only the OpenSSH client on their own workstation or build system. They cannot change the client software of other users, and an administrator's change to the server does not alter what a remote client offers. Check the client version with ssh -V. The client has to offer a post-quantum algorithm such as mlkem768x25519-sha256 for the server's hybrid key exchange to be used. If the client is an older version, upgrading it is the only fix on that side. Automated jobs and CI runners that use their own SSH client need the same check, because the user who owns that runner is the one who can change it.
AWS publishes no details of its SSH support
AWS's post-quantum cryptography page links the IETF draft draft-kampanakis-curdle-ssh-pq-ke on post-quantum hybrid key exchange for SSH. The sources do not give details of AWS's own SSH support beyond that link, so the page does not state which algorithms AWS services offer on their endpoints. Do not assume an AWS-managed service offers a post-quantum key exchange because the EC2 instance does. Ask AWS or check the service's own documentation for each managed service you use. The page is a starting point for the standard, not a statement about any one service.
AWS post-quantum pageCheck the change with a real connection
After the administrator makes a change, the check belongs to the person who connects. Run ssh -v against the instance and look for the key exchange line in the debug output, which names the algorithm the connection used. If the warning still appears, confirm three things: the instance runs the updated OpenSSH build, the cryptographic policy shows DEFAULT:PQ with update-crypto-policies --show, and the client offers a post-quantum algorithm. Also confirm that the change survives a reboot and that a configuration management tool does not overwrite it. A successful policy change on the server does not prove the connection changed, so test the connection itself.
How to check which key exchange an EC2 instance negotiates
This sequence confirms the operating system release, the installed OpenSSH version and whether the post-quantum crypto policy is active on an Amazon EC2 instance. It ends with a check of the accepted key exchange list and the algorithm your client negotiates, so you know whether the SSH post-quantum key exchange warning should still appear.
Connect to the instance over SSH or Systems Manager
Open a session to the instance using SSH or AWS Systems Manager Session Manager. The AL2023 post-quantum guide states that the PQ subpolicy requires an instance reached over one of these two methods, so use one of them for every check that follows. You know the session is working when you get a shell prompt on the instance and can run commands as a user with sudo rights.
Confirm the operating system release
Run cat /etc/os-release to identify the distribution and version, and check that it is Amazon Linux 2023 or Amazon Linux 2027. The AL2023 guide requires an instance at AL2023.12 or higher for the PQ subpolicy. If the instance is Amazon Linux 2, note that the AL2 release notes give an end-of-life date of June 30, 2026 and recommend migrating to Amazon Linux 2023, which means the PQ subpolicy steps below do not apply to that instance.
Check the installed OpenSSH version
Run ssh -V to print the OpenSSH version. On AL2023 builds from version 2023.12.20260803 and later, the installed OpenSSH should be 9.9. On earlier AL2023 builds, the version is 8.7, which means the instance has not taken the 9.9 rebase. The AL2027 documentation also states OpenSSH 9.9. Record the version and the release you confirmed in the previous step, then compare them against the AL2023 release notes listed on this page.
Check whether the PQ crypto policy is active
Run update-crypto-policies --show. If the output prints DEFAULT:PQ, the DEFAULT policy with the PQ subpolicy is active. Any other output means the subpolicy is not active on this instance. The AL2023 guide describes the commands to enable it, including sudo update-crypto-policies --set DEFAULT:PQ, so check the output against the guide before changing anything.
Review the accepted key exchange list
Open the SSH server defaults page for your release and compare the accepted key exchange algorithms against the list shown there. The AL2023 page lists curve25519-sha256, several ecdh-sha2 curves and several diffie-hellman group entries, with no ML-KEM entry. On AL2027, the default configuration lists the mlkem hybrid algorithms ahead of classical ones, and its hardened defaults are in /etc/ssh/sshd_config.d/10-amazon-hardening.conf. Use the page for your release as the reference for what the server offers.
Confirm the negotiated algorithm from the client
From the client machine, connect with verbose output enabled, for example ssh -v user@instance-address, and read the key exchange line in the output. Check the algorithm named there against the sources listed on this page to confirm that the connection negotiates a post-quantum hybrid key exchange. If the negotiated algorithm is still classical, the server or client policy has not taken effect, so return to the policy check and the defaults review before moving on.
Confirm the warning no longer appears
Reconnect from the same client and check whether the SSH post-quantum key exchange warning still appears. The warning should be gone only when the negotiated algorithm is a post-quantum hybrid. If the warning remains, record the OpenSSH version, the crypto policy output and the negotiated algorithm, and check them against the AWS post-quantum cryptography page and the sources listed here before making further changes.
Causes of the warning on EC2 and the fix for each
This table lists each cause of the SSH post-quantum key exchange warning on Amazon EC2 instances, with the fix the AWS documentation gives for it. Find the row that matches your instance's Amazon Linux release, OpenSSH version and enabled crypto policy, then apply the fix and reconnect. Confirm the warning stops by checking the negotiated key exchange on the next session.
| Cause | How to confirm it | Fix |
|---|---|---|
| AL2023 instance still on OpenSSH 8.7, before the 9.9 rebase | Run ssh -V and check for OpenSSH 8.7 instead of 9.9 | Update to a release that includes the OpenSSH 9.9 rebase, such as 2023.12.20260803 or later, and confirm the openssh package version |
| AL2023 instance where the PQ subpolicy is not enabled | Run update-crypto-policies --show and check whether DEFAULT:PQ is shown | Install crypto-policies-scripts, update crypto-policies, then run sudo update-crypto-policies --set DEFAULT:PQ |
| System that did not take the 2023.12.20260803 or 2023.12.20260817 update because of deterministic upgrade locking | Check /etc/dnf/vars/releasever and confirm a plain sudo dnf upgrade finds nothing to do | Run sudo dnf upgrade --releasever=latest to move to the latest release, which also locks the system to that release |
| AL2 instance, which reaches end of life on June 30, 2026 | Check the Amazon Linux release on the instance and confirm it is Amazon Linux 2 | Migrate the workload to Amazon Linux 2023, as the AL2 release notes strongly recommend |
| Client that does not offer ML-KEM | Check the client's supported key exchange list for mlkem768x25519-sha256 | Upgrade the client or library to a version that offers ML-KEM hybrid key exchange, and confirm the server's PQ policy is enabled |
What to change on an AL2023 instance to enable post-quantum key exchange
This sequence confirms the AL2023 release, moves the instance to a release that ships OpenSSH 9.9, and enables the PQ crypto-policies subpolicy so sshd offers the ML-KEM hybrid key exchange. Each step ends with a check you can run on the instance before you move to the next one.
Confirm the AL2023 release and OpenSSH version
Run
cat /etc/system-releaseandssh -Von the instance as an administrator. An instance on a release earlier than 2023.12.20260803 is not on the OpenSSH 9.9 rebase, and itsssh -Voutput will show OpenSSH 8.7 or an older 9.x build from before the rebase. Record both values so you can compare them after the change. The AL2023 release notes listopenssh-9.9p1-10.amzn2023.0.1in release 2023.12.20260803 andopenssh-9.9p1-10.amzn2023.0.2in release 2023.12.20260817, so the package version is the value to look for. If you cannot run these commands because the instance is managed through AWS Systems Manager, run them through that tool instead.Check the deterministic upgrade lock
Run
cat /etc/dnf/vars/releaseverto see whether the instance is pinned to a release. A new AL2023 instance is locked to its installed system-release version, so a plainsudo dnf upgradefinds nothing to do. If the file contains an older release version and you intend to move the instance to the latest release, continue to the next step. If you do not intend to change the release, record that decision, because the instance will not receive the OpenSSH 9.9 packages from the release notes. Confirm the lock state before you change it, and note the value in your change record.Move the instance to the latest release
Only if the lock check showed an older release you intend to move to, run
sudo dnf upgrade --releasever=latest. This installs the latest AL2023 release and locks the system to it, which means the instance will take that release on later upgrades too. Expect the openssh, openssh-clients and openssh-server packages to be part of the transaction if the release includes the 9.9 rebase. Afterward, runcat /etc/dnf/vars/releaseveragain andssh -V, and confirm that the release value has changed and that OpenSSH is now at the 9.9 build from the release notes. Plan a reboot or service restart as your change process requires.Install the crypto-policies scripts package
Run
sudo dnf -y install crypto-policies-scripts. The AL2023 guide says this package is needed before you can apply the PQ subpolicy with theupdate-crypto-policiescommand. Runrpm -q crypto-policies-scriptsto confirm the package is installed. If the install fails, check the dnf output for a repository or release-lock error before retrying, because the most common cause is an instance still pinned to an older release.Update the crypto-policies packages
Run
sudo dnf -y update crypto-policies crypto-policies-scriptsto bring both packages to the versions in the current release. The AL2023 guide gives this command as the step that updates the policy files that include the PQ subpolicy. Confirm the result withrpm -q crypto-policies crypto-policies-scriptsand check that both versions are the ones your release lists. If the update reports no packages to upgrade, the instance may already be current, and you can continue to the next step.Apply the DEFAULT:PQ crypto policy
Run
sudo update-crypto-policies --set DEFAULT:PQ. The AL2023 guide says this enables ML-KEM hybrid key exchange for the DEFAULT policy, and that the subpolicy can also be applied to other policies, for exampleFIPS:PQin FIPS environments. Runupdate-crypto-policies --showand confirm it printsDEFAULT:PQ. If your environment is a FIPS environment, usesudo update-crypto-policies --set FIPS:PQinstead, and confirm it printsFIPS:PQ. Check your compliance requirements for FIPS mode before you choose this value, because the choice of policy is yours to make.Reload sshd and check the release notes side effects
Before you restart or reload sshd, read the sshd and SetEnv behavior described in the 2023.12.20260803 release notes. OpenSSH 9.9 splits sshd into
sshdandsshd-session, so some log messages now carry thesshd-sessiontag. A new PAMServiceName directive defaults tosshd. SetEnv becomes first-match-wins in bothssh_configandsshd_config, so review any duplicate entries you rely on. Once you have checked your configuration, runsudo systemctl reload sshdorsudo systemctl restart sshd, and open a new session to confirm you can still log in before you close your existing one. Then verify the change from a client by runningssh -vvagainst the instance and looking for the negotiated key exchange algorithm in the output.
How the fix differs for AL2023, AL2027 and Amazon Linux 2 instances
Amazon Linux 2023 gets post-quantum key exchange through OpenSSH 9.9, which arrived in the 2023.12.20260803 release. Earlier AL2023 instances run OpenSSH 8.7 and do not offer ML-KEM hybrid key exchange by default. The post-quantum behavior is switched on through the crypto-policies PQ subpolicy, so an instance that has the rebased packages still needs the policy applied.
- Package version: Confirm that the openssh-server package is openssh-9.9p1-10.amzn2023.0.1 or later. The 2023.12.20260817 release lists openssh-9.9p1-10.amzn2023.0.2.
- Subpolicy commands: Install and update the crypto policy tooling with
sudo dnf -y install crypto-policies-scriptsandsudo dnf -y update crypto-policies crypto-policies-scripts, then apply the subpolicy withsudo update-crypto-policies --set DEFAULT:PQ. - Verification: Run
update-crypto-policies --showand check that it printsDEFAULT:PQ. - Upgrade locking: New AL2023 instances are locked to their installed release, so a plain
sudo dnf upgrademay do nothing. Usesudo dnf upgrade --releasever=latestto move to the latest release, noting that this locks the system to it. - OpenSSH 9.9 side effects: sshd is split into sshd and sshd-session, SetEnv becomes first-match-wins, and
ssh-keygen -Ano longer generates DSA keys. Review your configuration and logs after the update.
Confirm the result from a client by connecting to the instance and checking that the warning no longer appears.
Amazon Linux 2027 ships OpenSSH 9.9, up from 8.7 in AL2023, so the post-quantum capability is part of the release rather than a later rebase. Its default configuration lists the ML-KEM hybrid algorithms first, ahead of the classical key exchange methods. Hardened server defaults live in a separate drop-in file, so review that file before changing anything you rely on.
- Default algorithm order: The defaults list mlkem768x25519-sha256, mlkem768nistp256-sha256 and mlkem1024nistp384-sha384 before classical algorithms.
- Hardening file: Server hardening is set in /etc/ssh/sshd_config.d/10-amazon-hardening.conf. Read it before you add or override directives.
- Local overrides: If you have your own key exchange list, check whether it removes the ML-KEM entries, since a custom KexAlgorithms line replaces the defaults.
- Client compatibility: Confirm that the SSH clients that connect to the instance support the ML-KEM algorithms, because an older client falls back to a classical method.
- Version check: Run
ssh -Von the server or inspect the installed openssh package to confirm the build.
After any change, reconnect from a client and check that the warning no longer appears. The sources on this page do not list every hardening directive, so check the AL2027 SSH configuration documentation for the full set.
Amazon Linux 2 reached end of life on June 30, 2026, according to its 2.0.20260622.1 release notes, which strongly recommend migrating to Amazon Linux 2023. The release notes on this page do not describe a post-quantum key exchange update for Amazon Linux 2, so treat a fix on that release as a migration task rather than a configuration change.
- End of life: The release reached end of life on June 30, 2026, so it no longer receives updates.
- Recommended path: The release notes strongly recommend moving to Amazon Linux 2023.
- Scope of the fix: The sources here do not show a PQ key exchange update for Amazon Linux 2. Do not assume the AL2023 commands apply to it without checking.
- Inventory: List every instance still on Amazon Linux 2, because each one will keep the classical-only key exchange.
- Planning: Ask your platform team to plan the migration and to confirm the replacement AMI and application compatibility before cutover.
If an instance must keep running Amazon Linux 2 for a time, isolate it and record the risk. Confirm the current release status in the AWS release notes before you plan the work.
How to confirm the SSH session stops reporting the warning
Confirm the fix by repeating the connection and the checks from the check section on the same instance, then comparing the results. On the instance, run update-crypto-policies --show. Success means it prints DEFAULT:PQ, which shows the DEFAULT policy with the PQ subpolicy is active. The subpolicy is what enables the mlkem768x25519-sha256 key exchange in OpenSSH, as the AL2023 release notes describe. Then reconnect from your client with verbose output (for example, ssh -v) and look for the key exchange line. A successful session reports an ML-KEM hybrid algorithm negotiated, such as mlkem768x25519-sha256, and the warning no longer appears. Run the connection from the same client you used before, because a client that predates post-quantum support may still negotiate a classical algorithm or report the warning regardless of the server. Results depend on client version, so record the client version alongside the output you captured.
Watch a few things after the change. The OpenSSH 9.9 rebase splits sshd into sshd and sshd-session, and some log messages now carry the sshd-session tag. Log monitoring rules, alerts or dashboards that filter on the older sshd tag may miss those entries, so update the filters and confirm that authentication events still appear. Also check the behavior of two settings the release notes flag: SetEnv is now first-match-wins in ssh_config and sshd_config, and ssh-keygen -A no longer generates DSA keys. If a configuration or script relies on either, retest it. If an older client or automated job still fails to connect because it needs ssh-rsa signatures, which are disabled by default, the AL2023 documentation describes re-enabling them with sudo dnf install crypto-policies-scripts followed by sudo update-crypto-policies --set LEGACY. Treat that as a temporary compatibility step, record it as a deliberate exception, and plan to move the client forward rather than leave the setting in place.
What can break after enabling post-quantum key exchange on EC2
Enabling ML-KEM hybrid key exchange changes how an instance negotiates SSH, so the risks sit in the clients, scripts and configuration files that connect to it. Check each item below before you run the crypto-policies change, and confirm the same connections still work afterward.
Older clients and automation without ML-KEM
Clients built on older OpenSSH releases, or on libraries that do not offer ML-KEM, may fail to find a shared key exchange once the PQ subpolicy is active, or they may fall back to a classical algorithm. Scripts, backup jobs and configuration management tools that connect to the instance are the most likely to break silently. Check the OpenSSH version and key exchange list on each client that connects to the instance, and run a test connection from every automated job. Confirm the negotiated algorithm after the change with ssh -vv.
CI runners with pinned host keys or algorithms
CI runners often pin a host key in known_hosts or set an explicit list of key exchange algorithms in their SSH configuration. A pinned list that omits ML-KEM will not match the instance once it offers the hybrid algorithm, and a pinned host key will fail if the host keys change during the update. Search runner images, pipeline definitions and configuration files for KexAlgorithms, known_hosts and StrictHostKeyChecking settings. Update them in the same change window as the instance, then rerun a deployment job to confirm it connects.
The ssh_genkeytypes cloud-config override
The ssh_genkeytypes directive in cloud-init user-data controls which host keys are generated at first boot. On AL2023, this override determines which host keys exist, so an instance built from older user-data can present a different host key set than the one your clients expect. Review the user-data used by your launch templates and autoscaling groups before you rebuild or replace instances. Confirm the host keys on a test instance with ssh-keyscan before you roll the change out.
DSA key generation removed from ssh-keygen -A
OpenSSH 9.9 no longer generates DSA host keys when ssh-keygen -A runs. Any provisioning step that expects a DSA host key file to exist will fail or find nothing, and clients that were only offered DSA keys will no longer connect. Search your build scripts and image pipelines for ssh-keygen -A and for references to ssh_host_dsa_key. Remove the DSA expectation from those steps before you rebuild the image.
SetEnv becomes first-match-wins
With OpenSSH 9.9, the SetEnv directive in ssh_config and sshd_config is first-match-wins, so an earlier value now takes precedence over a later one. Configurations that relied on a later SetEnv line to override an earlier one will send or accept different environment variables after the update. Check the order of SetEnv lines in your configuration files, including files under /etc/ssh/ssh_config.d and /etc/ssh/sshd_config.d, and confirm that jobs reading those variables still behave correctly.
FIPS and compliance-mode configurations
The FIPS:PQ subpolicy is a separate choice from DEFAULT:PQ, and a FIPS-mode instance needs its own check. Instances that run under a compliance baseline or a hardened profile may override the crypto policy or the sshd hardening file, so the change can be rejected or reverted by your configuration management. Confirm the active policy with update-crypto-policies --show after the change, and record the result in your compliance evidence. The sources listed on this page do not say how FIPS validation applies to the PQ subpolicy, so check that with your assessor and the AWS documentation.
When to get outside help with the EC2 SSH warning
Get outside help when the fix cannot be made safely by the team that owns the instance, or when the change has to be proven to an auditor. The most common blocker is the operating system. An Amazon Linux 2023 instance gets OpenSSH 9.9 with the post-quantum key exchange only after it takes the 2023.12.20260803 release or later, and a new AL2023 instance is locked to its installed system-release version, so a plain sudo dnf upgrade may find nothing to do. Moving to a newer release with sudo dnf upgrade --releasever=latest changes the whole system, not just SSH. If application dependencies, vendor support statements or a change freeze prevent that, a planner should weigh the options together, including the post-quantum crypto policy on the existing release. Amazon Linux 2 reaches end of life on June 30, 2026, so instances still on it need a migration plan regardless of the SSH warning.
Ask for help as well when you do not control the instance or its image. If the AMI comes from a vendor, a marketplace listing or a central platform team, the SSH configuration may be baked into an image you cannot rebuild, and the change has to go through that owner. The same applies when many instances across several accounts show the warning. Inventory first: list each instance, its operating system release, whether update-crypto-policies --show reports DEFAULT:PQ or another PQ policy, and which clients connect to it. A fleet with mixed releases needs a sequenced rollout, and the side effects in the 9.9 release notes, such as the split of sshd into sshd and sshd-session, the first-match-wins SetEnv rule and the removal of DSA host keys from ssh-keygen -A, need to be tested against your own automation before anything is changed in production.
A regulated environment needs more than a working connection. It needs documented evidence that each change was planned, tested, approved and verified. DeployOpen plans and implements these changes, documents them and prepares the evidence your assessors will ask for, but DeployOpen does not issue audit reports, attestations or certifications. Those come from your independent auditor or certification body. Before engaging, confirm the scope in writing: which accounts and instances are covered, which operating system releases are in scope, how the rollout is verified, and what records are delivered at the end.
Questions people ask about the SSH post-quantum warning on EC2
Is my SSH connection still encrypted when the post-quantum warning appears?
Yes. The warning means the connection did not negotiate a post-quantum hybrid key exchange, so it uses a classical key exchange instead. That classical exchange still encrypts the session. The warning is about which key exchange algorithm was chosen, not about whether traffic is protected today. Confirm the algorithm your session negotiated by running ssh -v against the instance and reading the key exchange line in the output, or by checking the server's sshd_config settings with your own tooling. The sources on this page do not describe the security of any particular session in more detail than that.
Is the SSH post-quantum warning on EC2 urgent?
It is a planning item, not an emergency. The warning tells you the instance is not offering a post-quantum hybrid key exchange, and that is worth fixing on your migration schedule. Urgency depends on your own policy, your data sensitivity and any contract or agency requirement you are under. The sources on this page do not set a deadline for commercial workloads. For national security systems, the NSA's CNSA 2.0 guidance applies, and that is a reference point for you rather than a binding rule for a commercial organization. Ask your security or compliance team which timeline applies to your systems.
Can I ignore or silence the SSH post-quantum warning on EC2?
You can run connections while the warning is present, but silencing it is not the fix. Suppressing the message in a client hides the signal without changing which key exchange the server offers. The actual fix is to get the instance to offer a post-quantum hybrid key exchange, such as mlkem768x25519-sha256. On Amazon Linux 2023, the sources describe enabling the PQ subpolicy with sudo update-crypto-policies --set DEFAULT:PQ after installing crypto-policies-scripts and updating crypto-policies. Confirm the result with update-crypto-policies --show, which should print DEFAULT:PQ, and then check the negotiated algorithm again.
Why does the SSH post-quantum warning appear on EC2 now?
The warning appears because newer OpenSSH and operating system releases can offer post-quantum hybrid key exchange, and clients are starting to report when a server does not. On Amazon Linux 2023, the OpenSSH rebase to 9.9 arrived in release 2023.12.20260803, with the PQ subpolicy available for it. Before that rebase, an AL2023 instance ran OpenSSH 8.7, and the default SSH server configuration lists only classical key exchange algorithms. Amazon Linux 2027 includes OpenSSH 9.9 and lists post-quantum algorithms first by default. Check which OpenSSH version your instance runs with ssh -V on the instance.
What should I do if I cannot upgrade my EC2 instance right away?
Start by confirming what the instance runs and what it can offer. If the instance is on Amazon Linux 2023 but has not taken the 9.9 rebase, a plain sudo dnf upgrade may do nothing, because AL2023 locks new instances to their installed release. The documentation describes sudo dnf upgrade --releasever=latest to move to the latest release, but this locks the system to that version, so test it first. Instances on Amazon Linux 2 need migration, since the sources state AL2 reaches end of life on June 30, 2026 and strongly recommend moving to Amazon Linux 2023. Record the exception, the owner and the planned upgrade date in your inventory until the change is made.
Should I bring in outside help to fix the SSH post-quantum warning on EC2?
Outside help makes sense when the instances run many workloads, when upgrades touch production services, or when your compliance evidence needs to be prepared for an assessment. DeployOpen plans, implements, hardens and documents self-hosted platforms in your own infrastructure, and it can review an existing EC2 fleet and prepare the change plan and evidence. It does not issue audit reports or certifications. Most engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts. Ask for a written quote based on your instance count, operating systems and change windows, and confirm how testing and rollback are handled.
Will changing the SSH crypto policy break my existing SSH clients?
It can, so test before rolling out. The sources note several OpenSSH 9.9 side effects: sshd is split into sshd and sshd-session, a new PAMServiceName directive defaults to sshd, SetEnv becomes first-match-wins in ssh_config and sshd_config, and ssh-keygen -A no longer generates DSA keys. The sources also say ssh-rsa signatures are disabled by default, and that you can re-enable them with sudo update-crypto-policies --set LEGACY, though that weakens the policy. Clients that do not support the offered algorithms will fail to connect. Run a test instance first, confirm your clients still connect, and keep a rollback path ready.
How DeployOpen works on this
DeployOpen approaches the SSH post-quantum key exchange warning on Amazon EC2 instances as a written, fixed-scope engagement. We first establish which operating system and OpenSSH version each instance runs, then make the change in your own AWS account and confirm the warning clears on a test connection before handover.
How we scope
- We inventory which EC2 instances run Amazon Linux 2023, Amazon Linux 2 or other images, and which OpenSSH version each reports.
- We identify instances still on AL2023 without the 9.9 rebase, and instances that cannot take a release upgrade before end of life.
- We agree the scope in writing, covering the instances, the change method and the confirmation steps, with ongoing support available as a retainer.
How we build
- We apply the PQ subpolicy with update-crypto-policies on instances that already run AL2023.12 or higher, after confirming the access path first.
- We review the OpenSSH 9.9 side effects, including the sshd-session log tagging and the first-match-wins SetEnv behavior, before rollout.
- We test the change on a representative instance, then apply it across the fleet, recording any instances that need a release update first.
How we hand over
- We document the commands used, the policy each instance reports via update-crypto-policies --show, and the rollback steps.
- We record which instances were upgraded, which were isolated or left on classical key exchange, and the reason for each.
- We confirm with you that a fresh SSH session no longer shows the warning, and deliver the runbook for your administrators.
How we support
- We can retest the fleet after future AMI rebuilds, release upgrades or policy changes, so the warning does not return unnoticed.
- We can help plan the move off Amazon Linux 2 before its June 30, 2026 end of life, as stated in the AL2 release notes.
- Ongoing support, upgrades and continuous testing are available as retainers, scoped in writing with your team.

