1, use the WHO command to view the current login status.
, The WHO command allows you to view the current user and IP login status.
2, use the last command to view recent logins.
, the last command lists user logon times and IP records for the most recent period.
3. Use the Lastlog command to view individual user logins
, the Lastlog command lists the logins for each user and, if not logged in, displays never logged in, and displays the IP and logon hours if there is a login history.
4, view the/var/log/auth.log file, analyze user login and behavior.
, by looking at the Auth.log, you can analyze the user's attempts to log in and exit the history; it can also be seen that some illegal users try to brute force or try to password the user, if you often do, you need to find reasonable precautions, for example, modify the default SSH port number, set the Super user password more reasonable and more complex, and regularly Make changes and so on, avoid being hijacked by some hackers and use as a broiler, that will be enough for you to feel comfortable.
How to view user login and system licensing information under Ubuntu