Вопрос

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