質問

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?

役に立ちましたか?

解決

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.

他のヒント

User always sends login (git in your case). Public/private key pair is used only to verify user identify.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top