Github's documentation explains that there is this command that you can run to validate a key:
ssh -T [email protected]
I have also experimented and seen that you can run
ssh -T [email protected] verify
to get some info. Is there a command you can exec to get the same information you would get the same output as when you try to get a shell (with no extra args to ssh)?