Let's say we have a user account called john on a CentOS server (192.168.1.1) and on the other side we have a user who owns this account and from time to time uses his account from different locations (laptops) to SSH.
[jsmith@mac ~]# ssh [email protected]
[johnsmith@ubuntu ~]# ssh [email protected]
Now, here is the question:
On the server-side, is there any way to find out about the actual local user-id who launched the SSH client in order to initiate the SSH connection which means jsmith for the time that the user was using his Mac machine and johnsmith for the time that the user was using his Ubuntu machine.
Notes and cosideraitions:
- I have root access to the server-side. I can install and configure any service if needed.
- I do not have access to the client's machine and I can not ask him to use a specific SSH client or make any changes to his machine.
- This is the closet post I was able to find. Using ident (xinetd) but the answer is not clear.
Get username of user who initiated SSH connection?
Thank You,