Unable to connect with openssh 7.8 client and certificates
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Fedora) |
Confirmed
|
Undecided
|
|||
openssh (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Users are unable to connect to Ubuntu when using openssh client 7.8 and certificates. We have seen this with both xenial and bionic, but this affects connecting to ANY host running openssh server <7.8.
It appears to be specific to using certificate authentication.
The only known recourse at this time is either downgrade clients to 7.7 or a previous version of openssh, or create new keys/certificates with a different alg that is acceptable for both the older server and newer client.
The error message via ssh -vvv is:
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:REDACTED
debug1: send_pubkey_test: no mutual signature algorithm
When comparing the list returned from a 7.6 server and a 7.8 server via "ssh -Q key", we find that 7.8 returns <email address hidden> and <email address hidden> which are not present (or valid) for the earlier version server.
It appears that the change noted here in the release notes[1] for 7.8 is related:
* sshd(8): the semantics of PubkeyAcceptedK
HostbasedAcc
signature algorithms that are accepted for their respective
authentication mechanism, where previously they specified accepted
key types. This distinction matters when using the RSA/SHA2
signature algorithms "rsa-sha2-256", "rsa-sha2-512" and their
certificate counterparts. Configurations that override these
options but omit these algorithm names may cause unexpected
authentication failures (no action is required for configurations
that accept the default for these options).
This is also affecting other Linux distributions as well:
https:/
https:/
description: | updated |
summary: |
- Unable to connect with openssh 7.8 client + Unable to connect with openssh 7.8 client and certificates |
description: | updated |
Changed in openssh (Fedora): | |
importance: | Unknown → Undecided |
status: | Unknown → Confirmed |
Description of problem:
The OpenSSH server in RHEL7.6 does not send complete list of signature algorithms in SHA2 extension.
debug1: kex_input_ext_info: server- sig-algs= <rsa-sha2- 256,rsa- sha2-512>
This causes failures if the client is on OpenSSH 7.8p1+ (Fedora 28+) and for some reason disabled the rsa-sha2-* public key algorithms with PubkeyAcceptedK eyTypes configuration option.
The correct list should look like this:
debug1: kex_input_ext_info: server- sig-algs= <ssh-ed25519, ssh-rsa, rsa-sha2- 256,rsa- sha2-512, ssh-dss, ecdsa-sha2- nistp256, ecdsa-sha2- nistp384, ecdsa-sha2- nistp521, null>
This does not affect any other key types at this moment.
Version-Release number of selected component (if applicable):
openssh-7.4p1-16
How reproducible:
specific configuration
Steps to Reproduce: eyTypes= ssh-rsa example.com
1. Install OpenSSH 7.8p1 (Fedora 28+)
2. Configure pubkey authentication using RSA key with remote server example.com
3. ssh -vvv -o PubkeyAcceptedK
Actual results:
debug1: Next authentication method: publickey I1XXiJ/ wkXC6Vn8ohZVHcJ TCCKoPKm4mL8qtj tyNMhw /home/lslebodn/ .ssh/id_ rsa
debug1: Offering public key: RSA SHA256:
debug1: send_pubkey_test: no mutual signature algorithm
Expected results:
The authentication should proceed using ssh-rsa algorithm.
Additional info:
This is a change in OpenSSH 7.8 that it is getting more strict about handling this extension. Unfortunately we carry broken version in RHEL7, which is not sending complete list of algorithms.
Workaround:
In client, list also the SHA2 extension algorithms:
PubkeyAcceptedK eyTypes rsa-sha2- 256,rsa- sha2-512
If you need to adjust this list, rather use the + sign.
Thanks lslebodn for reporting this issue to me.