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.
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
Each ssh session has a corresponding tty process. Just check how long it has been running.