0

I was wondering if there was a way to detect which users had an active ssh session, or rather how long they have been logged in.

Thanks!

1
  • Out of curiosity, why do you want to track the time used?
    – Nick ODell
    Jun 14, 2011 at 4:19

2 Answers 2

2

use w and last.

0

Each ssh session has a corresponding tty process. Just check how long it has been running.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .