Skip to content

Add test-ssh-public-key-auth.sh script#516

Closed
vxgmichel wants to merge 1 commit into
masterfrom
vml/add-test-ssh-public-key-auth-script
Closed

Add test-ssh-public-key-auth.sh script#516
vxgmichel wants to merge 1 commit into
masterfrom
vml/add-test-ssh-public-key-auth-script

Conversation

@vxgmichel
Copy link
Copy Markdown
Contributor

@vxgmichel vxgmichel commented May 5, 2026

This PR adds a script to test that older OpenSSH client versions can still connect to an XCP-ng server using public key authentication.

Usage

± scripts/test-ssh-public-key-auth.sh 1.2.3.4 7.2_p2-r5 rsa 
Enter root@10.30.36.1 password: 
Pulling Docker image sig9/alpine-openssh-client:7.2_p2-r5...
Generating SSH key pair...
Copying public key to root@1.2.3.4 ...
Verifying SSH connection...
SSH connection successful, cleaning up...
✅ Test passed

Context

Due to the removal of the ssh-rsa signature algorithm in OpenSSH 9.8, older clients (version < 7.2) are no longer able to use public key authentication with ssh-rsa keys. Howerver, newer OpenSSH versions (7.2 and above) should still be able to authenticate using ssh-rsa keys, as well as ed25519 keys. This script can be used to verify this assumption by running a matrix of tests with different OpenSSH client versions and key types against a specified host. In practice, it should be run manually against a test XCP-ng server whenever the OpenSSH RPM package is updated, to ensure that we maintain compatibility with older clients.

Requirements

It requires Docker or Podman to be installed.

Why here?

It was decided during the daily meeting that this was the right place for test scripts that are not integrated in the CI.

Why not integrated in the CI?

Having to depend on Docker/Podman has been deemed to heavy for a script that can be run manually whenever a new OpenSSH RPM package is built. An alternative to consider in the future would be to use a VM image from our lab instead of a docker container.

@vxgmichel vxgmichel requested a review from a team as a code owner May 5, 2026 13:49
@vxgmichel vxgmichel force-pushed the vml/add-test-ssh-public-key-auth-script branch from 5247a57 to bd8a966 Compare May 5, 2026 13:51
Comment thread scripts/test-ssh-public-key-auth.sh Outdated
@rzr rzr requested a review from LucienLassalle May 5, 2026 14:50
@vxgmichel vxgmichel force-pushed the vml/add-test-ssh-public-key-auth-script branch from bd8a966 to 91dd9dd Compare May 5, 2026 15:17
@LucienLassalle
Copy link
Copy Markdown
Contributor

My opinion:

  • The OpenSSH test suite checks that we can already connect with ED25519 and RSA keys. (Duplicate)
  • And if we harden OpenSSH, we'll also need to modify xcp-ng-tests. And I'm afraid this script will rarely/never be used. (Potentially unnecessary work)

@rzr rzr requested a review from a team May 6, 2026 09:08
@vxgmichel
Copy link
Copy Markdown
Contributor Author

Conclusion from daily: we don't want to maintain this, the script can be found in this PR anyway if we need it later.

@vxgmichel vxgmichel closed this May 12, 2026
@vxgmichel vxgmichel reopened this May 12, 2026
Signed-off-by: Vincent Michel <vincent.michel@vates.tech>
@vxgmichel vxgmichel force-pushed the vml/add-test-ssh-public-key-auth-script branch from 91dd9dd to 1c96fd1 Compare May 12, 2026 13:06
@vxgmichel
Copy link
Copy Markdown
Contributor Author

Quick open/close to update the reference script

@vxgmichel vxgmichel closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants