jenkinsci / jenkinsci/ssh-agent-plugin

[JENKINS-72254] Add support for SSH Certificates

Open
#272 1 comment 0 reactions 0 assignees View on GitHub
component:ssh-agent-plugin enhancement imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
63
Forks
81
Avg merge
5h 36m
Merged PRs (30d)
9

Description

Currently the SSH-Agent plugin doesn't support SSH certificates (e.g. RSA-CERT). It can only load private keys. For example below my ssh-add -l command:2048 

2048 SHA256:FINGERPRINT COMMENT1 (RSA)

2048 SHA256:FINGERPRINT COMMENT2 (RSA)
256 SHA256:FINGERPRINT COMMENT3 (ED25519)
2048 SHA256:FINGERPRINT COMMENT4 (RSA-CERT)

It would be nice to load a certificate from the credential manager and add it to SSH-agent.

At this location: https://github.com/jenkinsci/ssh-agent-plugin/blob/878b53c895119c248eac9dd07da155a47aa99c88/src/main/java/com/cloudbees/jenkins/plugins/sshagent/exec/ExecRemoteAgent.java#L92C33-L92C51 a "*-cert.pub" file should be created besides the private key file so ssh-agent will also load the certificate.

When more information is required please ask!

---
Originally reported by joostr, imported from: Add support for SSH Certificates


  • status: Open
  • priority: Minor
  • component(s): ssh-agent-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20260604-211335

Raw content of original issue

Currently the SSH-Agent plugin doesn't support SSH certificates (e.g. RSA-CERT). It can only load private keys. For example below my ssh-add -l command:2048 



2048 SHA256:FINGERPRINT COMMENT1 (RSA)

2048 SHA256:FINGERPRINT COMMENT2 (RSA)
256 SHA256:FINGERPRINT COMMENT3 (ED25519)
2048 SHA256:FINGERPRINT COMMENT4 (RSA-CERT)


It would be nice to load a certificate from the credential manager and add it to SSH-agent.

At this location: https://github.com/jenkinsci/ssh-agent-plugin/blob/878b53c895119c248eac9dd07da155a47aa99c88/src/main/java/com/cloudbees/jenkins/plugins/sshagent/exec/ExecRemoteAgent.java#L92C33-L92C51 a "*-cert.pub" file should be created besides the private key file so ssh-agent will also load the certificate.

When more information is required please ask!

  • environment: Any Jenkins version

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.