Checking if someone is remotely accessing computer

Hi,

Can anyone tell me how one would go about checking whether someone is externally accessing a computer running Ubuntu MATE? I am thinking of things such as accessing the microphone and webcam and logging keys.

Thanks in advance!