GitHub SSH Signature Migration for One Agent Runner

Verify a GitHub SSH signature migration on one coding-agent runner. Keep the RSA key, replace the SHA-1 pin, and confirm read access to a private repository.

An RSA key marked ssh-rsa feeds the before SHA-1 pin and the after RSA SHA-2 alternatives, with the example host, account and branch listed below.An RSA key marked ssh-rsa feeds the before SHA-1 pin and the after RSA SHA-2 alternatives, with the example host, account and branch listed below.
Illustrative task:runner-ssh-01. The existing RSA public key can authenticate with a SHA-2 signature. Verify the intended account and branch read on the test runner. Based on GitHub’s SSH changelog and the OpenSSH configuration manual.

Your coding-agent runner uses an RSA key to read a private GitHub repository. The public key begins with ssh-rsa, and a workflow setting contains the same string. Which line needs to change? In this GitHub SSH signature migration, you’ll trace the workflow setting to OpenSSH, replace one SHA-1 pin in a test configuration, and verify the signature on the Git connection that lists refs/heads/main.

Sourcegraph’s November 30, 2026 guide, updated December 1, gives a starting query for finding SSH overrides. GitHub’s published schedule lists November 4 and December 9, 2026 as brownout dates and January 13, 2027 for removal of the legacy ssh-rsa signature type. The October 14 requirement sets a minimum of 3072 bits for newly uploaded RSA SSH keys. This example uses an existing registered RSA key, which GitHub documents can authenticate with rsa-sha2-512 or rsa-sha2-256. Sourcegraph’s RSA search guide · GitHub’s SSH changelog

Day-scaled GitHub SSH timeline with an October 14 RSA upload rule, November 4 and December 9 brownouts, and January 13 signature removal.Day-scaled GitHub SSH timeline with an October 14 RSA upload rule, November 4 and December 9 brownouts, and January 13 signature removal.
GitHub’s September 22, 2026 changelog schedules the RSA upload minimum, two brownouts and legacy signature removal.

Trace the pin from source to runner

  1. Open a diagnostic session in the test runner image under the operating-system user that runs the checkout. Use a POSIX shell, Git and a current OpenSSH build that recognizes PubkeyAcceptedAlgorithms. Choose an authorized private GitHub repository with an existing main branch, an already registered RSA identity available to the runner without interaction and trusted GitHub host keys provisioned through the normal runner setup.
  2. In Sourcegraph, run the two queries below against the repositories that own the runner configuration. Record the file and revision that produced the job you are investigating. If it was built from a different branch, tag or commit, inspect that revision as well.
  3. Read from the matching workflow line through to the Git invocation. Identify the SSH command Git receives, the configuration file it selects and any algorithm options on the command line. Follow that path until you can account for the value the running job passes to OpenSSH.

The illustrative case task:runner-ssh-01 uses the acme-runner organization, private test repository acme-runner/ssh-fixture and GitHub account acme-runner-bot. Substitute your authorized repository and expected account together before using any network command. The example assumes direct access to github.com on port 22, a plain RSA identity file at ~/.ssh/runner-test-rsa that the job can use noninteractively, and trusted GitHub host data in ~/.ssh/known_hosts. The SSH alias github-runner-test is defined in the test files below. The case names, file excerpts and outputs are illustrative expected observations.

repo:^github\.com/acme-runner/ patterntype:regexp /PubkeyAcceptedAlgorithms[^\n]*ssh-rsa/ count:all
repo:^github\.com/acme-runner/ type:file patterntype:regexp /^\s*ssh-rsa\s+/ count:all

The first query finds the directive and the token on one line, including occurrences inside a shell string. Read the whole argument. A bare ssh-rsa value replaces the algorithm list. A value beginning with + appends to the default list, - removes from it, and ^ places algorithms at the front. A subtraction may already be excluding the legacy signature. The second query looks for public-key-shaped lines in repository file content. count:all requests all matches subject to search limits, so check for a timeout before you rely on the results. Default-branch search can miss the revision that built a pinned runner image. Sourcegraph query syntax · OpenSSH client configuration

Opening of the Sourcegraph article Where is RSA hiding in your codebase?
Sourcegraph’s guide to finding RSA usage and reviewing cases that need migration. · Original source

In the worked case, the checkout step in acme-runner/runner-config supplies the following environment value to Git. The isolated baseline recreates its configuration effect locally. Use the SHA-2 configuration for the live connection.

GIT_SSH_COMMAND='ssh -F /opt/runner/github-ssh.conf -o PubkeyAcceptedAlgorithms=ssh-rsa'

Follow the assignment into its export, job environment or per-command environment. A match in a setup script may be overwritten by a later step or may only apply on another runner image. Pro Git describes GIT_SSH_COMMAND as a shell-interpreted SSH command that accepts extra arguments. The pin here is in the command itself, so editing the host stanza alone leaves the old command-line value in effect. A configuration template and a rendered file can both contain the same value. Find which one the launcher reads and which one the job regenerates before deciding where to make the eventual edit. Pro Git on environment variables · OpenSSH configuration precedence

The search also turns up a checked-in public-key excerpt. The middle field is shortened for illustration.

ssh-rsa AAAAB3NzaC1yc2EAAAADAQAB… acme-runner-bot

The first field describes the key format. The trailing comment is a label chosen by whoever stored the key. Use your existing account and key records to identify the credential that should authenticate the runner. The .pub suffix is a useful clue when reviewing the files provisioned for the job. GitHub documents common public-key filenames, and OpenSSH describes how the private key proves possession during authentication. The signature is chosen when the connection authenticates. The public key retains the same first field when it is used with SHA-2. Record the expected identity fingerprint from your key records so you can compare it with the signing trace later. GitHub’s existing-key guide · OpenSSH client manual · GitHub’s RSA migration guidance

Compare two isolated SSH configurations

  1. Create two user-owned configuration files in a disposable runner’s already provisioned ~/.ssh directory. Save the complete blocks below as runner-ssh-before.conf and runner-ssh-after.conf. Keep both files writable only by the runner user. Leave production configuration in place while you test.
  2. Check the binary available to the job with ssh -V and query its supported signature algorithms. Compare the evaluated before and after settings with ssh -G. Resolve a path, syntax or algorithm discrepancy before opening the live connection.
  3. Use the same network destination, host trust data and key source in both files. The files differ only in the user-authentication signature list. This lets you attribute an effective configuration change to that one line.

Save the baseline as ~/.ssh/runner-ssh-before.conf.

Host github-runner-test
    HostName github.com
    User git
    Port 22
    IdentityFile ~/.ssh/runner-test-rsa
    IdentitiesOnly yes
    PreferredAuthentications publickey
    BatchMode yes
    StrictHostKeyChecking yes
    UserKnownHostsFile ~/.ssh/known_hosts
    UpdateHostKeys no
    ControlPath none
    PubkeyAcceptedAlgorithms ssh-rsa

Save the candidate as ~/.ssh/runner-ssh-after.conf.

Host github-runner-test
    HostName github.com
    User git
    Port 22
    IdentityFile ~/.ssh/runner-test-rsa
    IdentitiesOnly yes
    PreferredAuthentications publickey
    BatchMode yes
    StrictHostKeyChecking yes
    UserKnownHostsFile ~/.ssh/known_hosts
    UpdateHostKeys no
    ControlPath none
    PubkeyAcceptedAlgorithms rsa-sha2-512,rsa-sha2-256

OpenSSH’s -F selects an alternative configuration file and tells OpenSSH to skip the system-wide SSH configuration file. In this direct-connection example, the two files provide the settings the diagnostic needs. A managed runner may require an approved proxy, mandatory includes or a nondefault trust store. Preserve those requirements in the test setup before connecting. Pay particular attention to any host alias normally supplied by that configuration. The target printed by the local config check should match the destination the job owner approved for the test. OpenSSH -F reference

IdentityFile selects the expected credential, and IdentitiesOnly yes constrains SSH to configured identities even when an authentication agent offers others. Multiple configured identity files can still accumulate across matching stanzas. The example names one identity and assumes it has no accompanying user certificate. BatchMode yes suppresses interaction so the diagnostic represents an unattended job. If the approved setup uses an authentication agent to hold the matching private key, make that same signer available in the test process. A key you unlocked only in a personal terminal is a different test environment from the job that has to perform the checkout. OpenSSH identity and batch mode options

ControlPath none prevents reuse of a previously authenticated connection. Reuse could give you a successful repository read without a fresh authentication trace. UpdateHostKeys no keeps the test from learning additional host keys, and strict checking stops a live connection when the host key is unknown or changed. The known-hosts entry belongs to the server. The identity file belongs to the client. Keep track of which one you are inspecting when the trace prints fingerprints for both. OpenSSH connection sharing and host trust options

ssh -V
ssh -Q PubkeyAcceptedAlgorithms
ssh -G -F ~/.ssh/runner-ssh-before.conf git@github-runner-test
ssh -G -F ~/.ssh/runner-ssh-after.conf git@github-runner-test

The capability query should list rsa-sha2-512 and rsa-sha2-256. The -G commands print evaluated configuration, including hostname github.com, user git and the expected identityfile. Look for pubkeyacceptedalgorithms ssh-rsa in the before output and pubkeyacceptedalgorithms rsa-sha2-512,rsa-sha2-256 in the after output. If the installed client rejects the old algorithm when parsing the before file, retain that error as the baseline observation and proceed only if the after file evaluates correctly. If the actual launcher still shows the old value, inspect its -o arguments and selected -F file. Most OpenSSH directives use the first obtained value, with command-line options read first. OpenSSH client flags · OpenSSH configuration precedence

These local checks answer two separate questions. The capability list tells you what the binary recognizes. The evaluated settings tell you what that invocation permits. You need both because a capable binary can still be restricted to SHA-1 by an old argument. A candidate setting that cannot be parsed needs a client or configuration fix before the network trace can tell you anything about authentication.

Verify the GitHub account and the remote ref

  1. Run the SSH greeting probe below with the after configuration. Check the account in the greeting and the host and method in the trace. Run it separately from the Git probe so you can interpret its documented exit status independently.
  2. Resolve the fixture URL with git ls-remote --get-url from the test job’s Git configuration context. If a rewrite changes the destination or transport, resolve that discrepancy before contacting the remote.
  3. Run the one-shot GIT_SSH_COMMAND example. Require a fresh SSH authentication using the intended RSA identity and a supported signature, followed by the expected ref and exit status zero from Git.
ssh -vvv -T -F ~/.ssh/runner-ssh-after.conf git@github-runner-test

GitHub documents a greeting that names the authenticated user and says shell access is unavailable. Expect the greeting to begin with Hi acme-runner-bot in this illustrative case. GitHub documents status 1 for a successful greeting probe. Read the message even if your shell reports a nonzero status. The SSH login user git is part of the connection address. The name in the greeting identifies the account GitHub authenticated. Check the trace for a match to the trusted github.com host key and for completed public-key authentication. GitHub’s SSH connection test · OpenSSH verbosity and host verification

git ls-remote --get-url git@github-runner-test:acme-runner/ssh-fixture.git

The expected expanded URL is git@github-runner-test:acme-runner/ssh-fixture.git. The alias resolves to github.com through the after file. The URL check is local and accounts for insteadOf rewrites. An HTTPS expansion would take the next command off the SSH path. A different SSH host or repository would test a different destination. If the output differs, trace the rewrite in the same job context before running the live probe. Git ls-remote options

GIT_SSH_COMMAND='ssh -vvv -F ~/.ssh/runner-ssh-after.conf' \
  git ls-remote --exit-code --refs \
  git@github-runner-test:acme-runner/ssh-fixture.git refs/heads/main
printf 'git exit status: %s\n' "$?"

Run the block in a diagnostic shell that lets you observe failure statuses. The inline assignment selects the SSH command for the Git process on that line. Git interprets the stored command through a shell, which expands the tilde for the runner user. git ls-remote lists remote references and their object IDs. --refs excludes pseudorefs such as HEAD, and --exit-code returns status 2 when the remote has no matching ref. Verify the ref field for exact equality because Git matches patterns against ref tails. Read the status before running another shell command. If the runner captures output for a later check, retain Git’s status alongside the output so the status of a log reader cannot be mistaken for Git’s. Pro Git on GIT_SSH_COMMAND · Git ls-remote output and status

Input Action Expected result
task:runner-ssh-01, account acme-runner-bot, RSA identity ~/.ssh/runner-test-rsa, private repo acme-runner/ssh-fixture, expected refs/heads/main Run ssh -vvv -T -F ~/.ssh/runner-ssh-after.conf git@github-runner-test, then the GIT_SSH_COMMAND and git ls-remote --exit-code --refs block above. Illustrative expected observation. GitHub greets acme-runner-bot. Git’s SSH trace shows rsa-sha2-512 or rsa-sha2-256 for the expected identity and completed public-key authentication. Git prints an object ID with refs/heads/main and exits 0.

Read Git’s own SSH trace even if the greeting already showed the right signature. In OpenSSH’s implementation, sign_and_send_pubkey logs signing using with the algorithm and identity fingerprint at debug level three before asking the signer to produce the signature. Pair that line with a subsequent Authenticated to message using publickey in the same connection. A signing line followed by a signer error records an attempt. If more than one attempt appears, follow the trace through to the successful one and check its fingerprint against the expected runner key. The SHA256: prefix names the hash used for a fingerprint. Read the signature algorithm from the rsa-sha2-* name in the signing line. OpenSSH public-key authentication implementation

Illustrative expected excerpts from the Git invocation
... signing using rsa-sha2-512 SHA256:<runner-key-fingerprint>
Authenticated to github.com (...) using "publickey".
4f3b2a1c9d8e7f6051428390abcdef1234567890	refs/heads/main
git exit status: 0

The object ID is illustrative. If your fixture is pinned to a known commit, compare the first field with its recorded ID. For an intentionally moving branch, verify the exact ref and record the returned ID. A successful result establishes that the runner can read the branch reference under the tested identity. Use the actual test checkout to check any subsequent fetch and working-tree behavior. In a shared ticket, record the algorithm, matched account, ref and status. Keep the full verbose trace, which can include local paths and identity metadata, in the runner’s approved log location. Git’s ref output format

Three descending checks show host trust, RSA SHA-2 public-key authentication and a Git read of refs/heads/main.Three descending checks show host trust, RSA SHA-2 public-key authentication and a Git read of refs/heads/main.
Illustrative checkout verification from the runner. The SSH greeting identifies the account. The Git probe supplies its own signing and authentication evidence plus the ref result. Based on OpenSSH, GitHub Docs and Git.

Fix the first failing observation

First failing observation Inspect next Recovery for this runner
Connection times out or fails before a host key is shown The job’s route and reachability to github.com:22 Restore the approved network path or use the sanctioned runner environment. Repeat against the same destination.
Host key is unknown or changed GitHub’s published host fingerprint and the trust file loaded in the job Have the runner owner correct the approved trust data before reconnecting. Keep StrictHostKeyChecking yes.
Key exchange or host-key algorithm negotiation fails The client version and effective KexAlgorithms or HostKeyAlgorithms Resolve the transport or server-authentication setting at its source. Look for pins in the actual workflow or its loaded configuration.
The expected RSA identity is skipped or no mutual signature algorithm is available The runner’s supported algorithms, effective PubkeyAcceptedAlgorithms and preceding trace messages Remove the job’s legacy-only argument and retest. If the same job binary lacks SHA-2 support, update OpenSSH through the normal runner image process.
The correct key is selected but signing fails The runner’s identity path, permissions and approved signer Restore the intended noninteractive signer or key provisioning. Collect a fresh trace through completed authentication.
GitHub greets a different account The key chosen by OpenSSH and its registration on GitHub Select the approved identity for acme-runner-bot and repeat the greeting before querying the private repository.
The correct account authenticates but Git reports a repository error The expanded URL, repository spelling and expected account’s read grant Confirm the private repository with its owner and restore only the intended read access if needed.
Git returns 2 with an empty result The ref pattern and the test repository’s branches Check whether refs/heads/main exists and is visible to that account. Correct the test expectation or restore the known fixture, then repeat the read.

Use the earliest failing observation to choose where to intervene. If the connection stops at host verification, account authentication is still untested. If you see Permission denied (publickey), read back to the identity-selection and signing messages. OpenSSH may skip the key before offering it, or it may reach the signer and fail there. A correct account greeting followed by a repository error gives the repository owner a concrete path and authenticated account to check. If the greeting succeeded but the Git trace stopped earlier, compare the two invocations before escalating. The URL, selected file or effective identity may differ. OpenSSH authentication source · GitHub’s SSH connection test · Git’s ref status rules

If the workflow uses HTTPS, use the instructions for that checkout path. Git HTTPS authentication guide for agent CI

If the SSH ref check succeeds and the working tree still lacks a managed file, check how the fixture is fetched. Git LFS checkout recovery guide

For a reachability failure in a sandboxed job, run your probe in the worker’s own network context. Use the approved SSH route for this fixture. Runner network policy verification guide

Remove the test override and verify the workflow change

  1. In the test workflow’s ordinary checkout setup, replace the legacy-only command-line pin with the tested SHA-2 list for that GitHub connection. If the approved runner defaults already allow SHA-2 and exclude SHA-1, removing the pin is another supported test. Review the effective settings for the actual destination after either edit.
  2. Repeat the ref query through the test workflow launcher with verbosity enabled and a fresh SSH connection. Confirm the signing algorithm and identity, successful public-key authentication, exact ref and Git status from the same invocation.
  3. Retire the temporary files once the job no longer refers to them. If you set the temporary command in a persistent job environment, restore the previous setting or remove the temporary entry before the next run. The inline assignment in the example is scoped to that Git invocation.

For the illustrative workflow in /opt/runner, the direct replacement is GIT_SSH_COMMAND='ssh -F /opt/runner/github-ssh.conf -o PubkeyAcceptedAlgorithms=rsa-sha2-512,rsa-sha2-256'. Apply it to the test checkout step. Use the launcher’s usual host spelling and the authorized fixture. The isolated alias belongs to the two diagnostic files and requires a corresponding host stanza to resolve. If the ordinary launcher shares SSH connections, add -S none and -vvv to its SSH invocation for the repeat so you can observe fresh authentication. Remove those diagnostic flags afterward. The regular launcher check catches cases where an isolated config worked but a wrapper still supplies the old argument or uses a different identity. Pro Git on environment variables · OpenSSH client flags

If the experiment fails, restore the previous test configuration through the provisioning step that installed the candidate or discard the disposable job. To confirm restoration, compare the effective configuration with the local baseline. Restoring a legacy pin restores the earlier configuration state. GitHub’s policy still governs whether a SHA-1 connection can succeed, so baseline restoration is a way to reset the experiment. Keep the production edit pending until the test workflow gives you the intended identity, completed SHA-2 public-key authentication and the successful refs/heads/main read. GitHub SSH compatibility schedule · OpenSSH evaluated configuration

Record the runner image or deployment revision with those observations. If another checkout subsequently fails, the record tells the engineer which configuration and identity produced the successful read. For a checkout that can run in more than one launch environment, identify which environment supplied the settings before transferring a result from one runner to another. Scope the result to the tested checkout path, identity and private repository. AgentOps fleet guide · Headless reproducibility guide

Sources

  1. Sourcegraph — Where is RSA hiding in your codebase?
  2. GitHub Changelog — Security improvements for SSH
  3. Sourcegraph — Code Search query syntax
  4. OpenBSD — ssh_config(5)
  5. GitHub Docs — Checking for existing SSH keys
  6. GitHub Docs — Testing your SSH connection
  7. Pro Git — Environment Variables
  8. Git — git-ls-remote
  9. OpenBSD — ssh(1)
  10. OpenSSH portable — sshconnect2.c

Many assistants.
One place to remember.

Bring your AI sessions, context, and usage together with Automater.

Meet Automater