How can I get the comment of the current authorized_keys ssh key ?

Posted by krosenvold on Super User See other posts from Super User or by krosenvold
Published on 2009-08-12T20:30:28Z Indexed on 2010/06/16 15:33 UTC
Read the original article Hit count: 159

Filed under:
|
|

Edit: What I really need to know WHICH ssh key from authorized_keys has been used to identify the currently logged on user.

According to "man sshd":

Protocol 2 public key consist of options, keytype, base64-encoded key, comment.

I see that when I use ssh-keygen, the comment is usually the local identity of the user. Is there any way to access this value when I'm on the remote computer ? (Kind of like the SSH_CLIENT shell variable)

(Assuming I enforce the comment to be a remote identity of some sort, I would like to log this from a shell-script! This is on ubuntu)

© Super User or respective owner

Related posts about linux

Related posts about ubuntu