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!

  • Out of curiosity, why do you want to track the time used? – Nick ODell Jun 14 '11 at 4:19
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.