If what you use is a certificate based authentication, you can add user
identity to the certificate with -I .
Any auth attempt will make that identity logged automatically. Then you
just have to get it from syslogs.



Le sam. 8 août 2020 à 02:26, Kushal Kumaran <[email protected]> a écrit :

> Rainer Dorsch <[email protected]> writes:
>
> > Hi,
> >
> > can anybody tell if there is a way to find out the ssh key (out of the
> ones
> > listed in authorized keys) was used for login to the current session?
> >
>
> See the environment="NAME=value" part in the authorized_keys(5) manpage.
> You can have each entry in authorized_keys set a different value for
> some variable you pick.
>
> You may also be able to use command="command" creatively.  This is what
> gitolite does: https://gitolite.com/gitolite/glssh
>
> --
> regards,
> kushal
>
>

Reply via email to