I would like to know which key was used when logging into an SSH session. I wan to correlate the key to a local database and send email to an address which corresponds to the key.
The first step is to find which key is the one being used.
|
feedback
|
|
To do this you will have to raise the
in
The You can obtain the fingerprint of a particular key by using the command
where keyfile is the public key
| |||
|
feedback
|
|
You will need to turn up logging. On the client side, "ssh -v" will which private key was used. On the server side, default log levels will only show that a public key was used (as opposed to password auth). You will need to set the logging level in sshd_config to at least VERBOSE. | |||
|
feedback
|