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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.