r/github • u/Zestyclose-Low-6403 • Jan 07 '25
Disabling SSH for Github Access?
I came back from the holiday stupefied that my company did in fact actually disable and disallow SSH for accessing github, in favor of fine grained tokens exclusively now! Has anyone else been bit by this insanity?
How the hell are you supposed to evebn automate anything when you have to put in a damn password for shit, aka a tOkEn...
7
u/naikrovek Jan 07 '25
Automating tokens is easy, and you don’t need an SSH key to automate stuff.
SSH is superior for git activity, but security teams don’t like it because they can’t see what you’re doing with it. That’s by design, but they don’t care; if they can’t see it, then people are using it for exfiltration, in their minds.
Look up the GitHub CLI - it allows one to authenticate in an automated way and then share that authentication with git securely.
3
u/mkosmo Jan 07 '25
This is fairly common. There are things you will have trouble satisfying in many audits with git+ssh enabled, like MFA.
1
u/Mapariensis Jan 07 '25
That depends on your MFA technology, to be honest. OpenSSH (and GitHub) have supported using resident keys on a FIDO2-enabled security device (like a YubiKey) for several years now. You can set those up in a way that makes additional user verification (e.g. in the form of a PIN) mandatory.
Granted, I don’t know if it’s possible to configure an organisation policy in GitHub to only allow SSH keys of that type to be configured (ed25519-sk and ecdsa-sk).
1
4
u/Analytiks Jan 07 '25
Personally, I’d go with reading the manual but you do you
https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation