Is it possible to find out which ssh key was used to access an account? I have an account on a server that I let several (trusted!) people have access to via ssh. I'd find it useful to be able to know who logged in and when. I have root access so I can look at the logs, but there doesn't seem to be anything there. Is there some configuration switch that will put some way of identifying the key in the logs?
Ssh – find out which ssh key was used to access an account
authenticationlogsssh
Best Answer
If you go into the sshd config file (usually
/etc/ssh/sshd_config
) and change the LogLevel directive to VERBOSE:...you can see something like this in the logs:
From
man sshd_config
: