I'm fairly certain this is done using a centralized authorized_keys file along with the command option. Check out the AUTHORIZED_KEYS FILE FORMAT section of the man page.
How to get the user info by the public key the user sent over ssh?
Question
When a user connect over SSH with public key, how did Github detect which user it is?
ssh -T git@github.com
Hi **Ben**! You've successfully authenticated, but GitHub does not provide shell access.
How to implement such a feature, especially consider that the user info is in some database like MySQL?
Solution
OTHER TIPS
User always sends login (git
in your case). Public/private key pair is used only to verify user identify.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow