who is logged in
See who is on this machine now, who was before, and the failed attempts.
Steps
-
whothe users logged in now, and from where
-
wthe same, with what each one is running
-
last -n 20the last 20 logins
-
sudo lastb -n 20the last 20 failed logins
-
journalctl -u ssh --since todaytoday's ssh logins and attempts (the service is `sshd` on Fedora and Arch)
-
loginctl list-sessionsthe sessions systemd knows
Notes
- Many failed logins from one address usually mean someone is guessing passwords: see fail2ban.
- macOS:
who,wandlastwork the same.
Commands used
whowlastjournalctl
Each has a page in lore: lore who opens it.
Related recipes
- change permissions of a folder and everything in itGive a folder, its subfolders and its files the permissions or the owner they need, without making them open to everyone.
- add a userCreate an account with a home folder and a password, and let it use sudo if it should.
- check a certificateSee a site's TLS certificate, when it expires and who issued it, or the same for a .pem file.
- check a file's permissionsSee who may read, write and run a file or a folder, and why a path is refused.