> 
> **Possible Duplicate:**  
> 
> [How can I audit users and access attempts to SSH on my server?](https://askubuntu.com/questions/3850/how-can-i-audit-users-and-access-attempts-to-ssh-on-my-server) 
> 
> 
> 

I recently had to give away my Ubuntu 12.10 root password to one of my friends so that he could SSH into my system and send some files to me. Now he is my friend and I trust him so I was not reluctant in sharing my password. And I did change it afterwards.

But it just struck me how can I view all the commands that were executed by some other user remote logging into my system (obviously not my friend. I mean in general).To what extent can they access my data (especially my passwords eg I use Last Pass so can they access my account passwords as well??)
And if they open any browser after logging into my system do they have access to all my passwords provided I have saved them using the "remember password" option given by chrome

Also what precautions I should take when I am allowing some one to remote login in my system and how can I track the various commands used by them or the changes they made in my system. Also is there some simple way to get notified whenever some one logs into my system apart from checking the /var/log/auth.log file??