From debian-user Sun Aug 09 19:52:05 2020 From: Rainer Dorsch Date: Sun, 09 Aug 2020 19:52:05 +0000 To: debian-user Subject: Re: ssh key used for login Message-Id: <72601968.ImfteLzJap () h370-wlan> X-MARC-Message: https://marc.info/?l=debian-user&m=159700275102752 Am Samstag, 8. August 2020, 02:26:20 CEST schrieb Kushal Kumaran: > Rainer Dorsch 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 Many thanks, for your suggestion, that looks promising, I will give it a try. Rainer -- Rainer Dorsch http://bokomoko.de/