How to get the certificate details for the current logged in session of linux server in SSH certificate based authenticaiton?

22 Views Asked by At

I am using Certificate based authentication for SSH server access. I need to get the certificate details of the current logged-in session. How to do it without grepping into /var/log/secure file? Need a linux command for it.

I tried grep "sshd.* Accepted publickey.* ID" /var/log/secure | tail -n 1

but i need a direct command which will display the current logged-in session's certificate KEY ID

0

There are 0 best solutions below