My github account was forced to use 2FA some time ago, maybe a year, whatever. Since then I have changed my mobile ph # and can't get text on the # github has attached to my account. I think I know my pwd but can't be authenticated w/o the second factor and I don't know of any other authentication factor.
But, I do have working ssh keys for github on at least one machine, and maybe a couple others. In fact I just successfully pushed a commit to github origin/master on a repository just a minute ago.
It seems like I ought to be able to use some terminal commands to restore my account access and I can't figure out how and google-fu hasn't helped so far.
No, all such terminal commands can only work through GitHub API (which would use OAuth2 or PAT). GitHub doesn't provide any account-management commands over SSH.
Contact GitHub support.