Hasty Briefsbeta

Bilingual

GitHub suddenly rejected my SSH key (the fix was a .pub file?)

9 hours ago
  • Git pull stopped working on a laptop with an SSH key that was previously fine, while the same key worked on other devices.
  • The private key was valid, using a modern signature algorithm, and SSH config was correct; GitHub status was green.
  • The fix was simply generating a missing .pub file from the private key using `ssh-keygen -y -f <key> > <key>.pub`.
  • A 12-trial test confirmed that the .pub file is required: without it, authentication is rejected; with it, it works.
  • The .pub file changes OpenSSH's authentication flow: with it, the client probes the server before signing; without it, it sends a direct signed request.
  • Both flows are valid per RFC 4252, but GitHub seems to now reject the direct signed request, possibly due to new server software (identified by banner '6a2c000').
  • The author suggests that GitHub's SSH frontend changed, causing the issue, and recommends ensuring that all private keys have corresponding .pub files.