Reputation: 43
Doing some platform automation and planning to devise some logic around how long a user ssh session is being active. is there a way to find?
Upvotes: 1
Views: 2185
Reputation: 349
Have you checked the output of "last", maybe it would be sufficient?
server ~ $ last
root pts/0 10.31.1.162 Fri Dec 11 10:35 still logged in
root pts/0 10.31.1.162 Thu Dec 10 11:12 - 11:22 (00:09)
root pts/0 10.31.1.162 Thu Dec 10 09:19 - 11:09 (01:50)
Upvotes: 1