ssh from a cluster node triggers public key error for all remote hosts (MWE for github)

Viewed 52

Question:

For some reason all remote hosts stopped accepting my ssh key. While troubleshooting this, I finally realized that even removing my public key completely from github (which should still fall back to password until 8/13) still produces a "publickey" error. How do I fix this?

Steps to reproduce:

  1. remove my cluster account public key from github user settings
  2. attempt to connect (produces error)
[me@login-node:/data/homevols/me] $ssh -T git@github.com
Permission denied (publickey).

Sanity-check:

[me@login-node:/data/homevols/me] $less ~/.ssh/config
Host *
 IdentityFile ~/.ssh/id_rsa
/data/homevols/me/.ssh/config (END)
1 Answers

I have never seen GitHub fall back to password with SSH: it uses the technical account git, for which there is no password anyway.
That means ssh -oPubkeyAuthentication=no git@github.com would still return git@github.com: Permission denied (publickey)., without asking for password.

In your case: generate a new SSH key, add the public one to your profile, and try again:

ssh -Tv git@github.com

You should see a Welcome message

> Hi username! You've successfully authenticated, but GitHub does not
> provide shell access.
Related