On Debian and Ubuntu, check /var/log/auth.log. On RHEL, Rocky, AlmaLinux, and Fedora, check /var/log/secure. On a systemd host, the authoritative record may exist only in the journal, which you query with journalctl -u ssh or journalctl -u sshd. The service unit and available text file depend on the distribution and logging stack.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
Use sudo for these commands: authentication logs are normally readable only by root or members of a privileged group.
As an Amazon Associate I earn from qualifying purchases.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallSSH log locations by Linux distribution
OpenSSH sends authentication messages to the host’s logging system; it does not guarantee one universal file path. Traditional rsyslog rules write those messages to distribution-specific files, while systemd-journald keeps them in a binary journal that is searched with journalctl. A machine can have both copies, or only the journal.
| Environment | Logging backend | First place to check | Example query |
|---|---|---|---|
| Debian or Ubuntu with rsyslog | rsyslog text files | /var/log/auth.log |
sudo grep sshd /var/log/auth.log |
| RHEL, Rocky, AlmaLinux, or Fedora with rsyslog | rsyslog text files | /var/log/secure |
sudo grep sshd /var/log/secure |
| Any systemd-based distribution | systemd-journald | Journal entries for the ssh or sshd unit |
sudo journalctl -u ssh --since today or sudo journalctl -u sshd --since today |
| Host running auditd | Linux audit subsystem | /var/log/audit/audit.log |
sudo ausearch -m USER_LOGIN |
The text files and journal can contain overlapping authentication events. Audit records, login databases, and shell history answer different questions and should not be treated as interchangeable SSH logs.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
Where are SSH login attempts logged on Ubuntu?
Read the current text log
On a conventional Ubuntu or Debian installation with rsyslog enabled, /var/log/auth.log is the normal file for SSH authentication messages. To display the newest 50 SSH-related lines:
sudo grep -E 'sshd|ssh' /var/log/auth.log | tail -n 50
To isolate rejected password attempts, search for the daemon’s standard message:
sudo grep 'Failed password' /var/log/auth.log
Successful public-key, password, or other accepted sessions normally contain Accepted:
sudo grep 'Accepted' /var/log/auth.log
Use the file’s rotated copies when investigating an older date. Names commonly include auth.log.1 and compressed files such as auth.log.2.gz; list the directory before searching so you know which periods are available:
sudo ls -lh /var/log/auth.log*
For compressed rotations, use zgrep, for example:
sudo zgrep -E 'Failed password|Accepted' /var/log/auth.log.2.gz
Ubuntu systems with no auth.log
A fresh Debian 12 installation may not install rsyslog by default. If rsyslog is absent or inactive, the journal can be the only local record even though SSH logging is working normally. Do not create an empty file and assume it is collecting events; check the journal and service state first.
What is the SSH log file in CentOS, RHEL, Rocky, AlmaLinux, or Fedora?
Read /var/log/secure
RHEL-family systems traditionally route authentication and authorization messages to /var/log/secure. This includes RHEL, CentOS-derived systems such as Rocky and AlmaLinux, and Fedora installations that retain rsyslog. Query recent SSH lines with:
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →sudo grep -E 'sshd|ssh' /var/log/secure | tail -n 50
Search for failed and accepted sessions in the same way:
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
sudo grep 'Failed password' /var/log/secure
sudo grep 'Accepted' /var/log/secure
Check rotated files before concluding that an event never occurred:
sudo ls -lh /var/log/secure*
Fedora stopped installing rsyslog by default in Fedora 20. Upgraded machines may still have it, while newer or minimally installed systems may retain only journald. Therefore, a missing /var/log/secure is often a backend choice rather than evidence that sshd generated no messages.
How to use journalctl to see SSH logins
Try both common unit names
Systemd distributions name the OpenSSH service differently. Run both commands if you do not know the unit name:
sudo journalctl -u ssh --since today
sudo journalctl -u sshd --since today
An error saying a unit does not exist does not prove that SSH is uninstalled; it may simply use the other name. Discover the installed service with:
systemctl list-units --type=service | grep -E 'ssh|sshd'
systemctl list-unit-files | grep -E 'ssh|sshd'
Once you identify the unit, add useful journal filters:
# Last 24 hours, newest entries at the end
sudo journalctl -u sshd --since '24 hours ago' --no-pager
# Follow new events as they arrive
sudo journalctl -u sshd -f
# Show only messages containing authentication keywords
sudo journalctl -u sshd --since today | grep -E 'Failed|Accepted|Invalid|authentication'
If the distribution uses a socket or a service wrapper, filtering by process name can be useful when the unit filter returns nothing:
sudo journalctl _COMM=sshd --since today
Journal access is also controlled by permissions. A non-root user may see only a restricted subset or no system-wide entries; rerun the command with sudo when results look incomplete.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Inspect older boots and retention
The journal may be volatile, persistent, or limited by local policy. Check how much space it uses and which boots are still retained:
sudo journalctl --disk-usage
sudo journalctl --list-boots
To inspect an earlier boot, pass its index from --list-boots, such as:
sudo journalctl -b -1 -u sshd
Retention has no universal duration: image defaults, available disk space, explicit limits, and administrator policy determine whether an event from a previous week or reboot remains searchable.
Why is /var/log/auth.log or /var/log/secure missing?
Check whether journald and rsyslog are running
First establish which logging services exist and are active:
Recommended Free Tools
systemctl is-active systemd-journald
systemctl is-active rsyslog
ls -l /var/log/auth.log /var/log/secure 2>/dev/null
systemd-journald is normally present on systemd hosts. If it is active and the journal query returns SSH messages, the absence of a text file is expected when rsyslog is not installed or enabled. If rsyslog is installed but inactive, its files may stop receiving new entries while journald continues to collect them.
Understand the distribution defaults
Debian 12 no longer installs rsyslog by default, and Fedora stopped doing so by default in Fedora 20. Cloud images, containers, hardened builds, and upgraded servers can therefore have different combinations of journald and rsyslog. Two servers running the same distribution name may expose different paths because one inherited an older configuration.
Verify that the SSH daemon is actually producing events
Check the daemon status and recent service messages:
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
sudo systemctl status ssh
sudo systemctl status sshd
sudo journalctl -xe --since '15 minutes ago'
Only one of the two service names may exist. A failed service, a connection reaching a different host, or a firewall dropping traffic before it reaches sshd will produce a different diagnosis from a logging-routing problem.
What information appears in an SSH authentication log?
Failed attempts
Entries containing Failed password generally identify the account name supplied, the remote address, and the authentication method. Invalid user indicates that the requested account was not recognized. Repeated failures from one address can indicate password guessing, but an IP address alone does not establish who controlled the client or whether a successful compromise occurred.
Successful sessions
Accepted password, Accepted publickey, and similar messages show that an authentication method was accepted by sshd. Record the timestamp, account, source address, and method, then correlate the session with other host evidence before attributing activity to a person.
Connection and negotiation messages
Depending on the configured log level, the daemon may also report disconnects, protocol negotiation failures, refused keys, and account restrictions. A quiet log can therefore mean either no activity or a logging level that omits lower-priority details.
SSH authentication logs are not a complete activity record
An SSH log answers “what did the SSH daemon accept or reject?” It does not automatically show every command typed after login, files changed through a session, or actions performed through another service.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →wtmpandlast: Login accounting databases used to review recorded sessions and their duration. Runlastto inspect normal login records.btmpandlastb: Failed-login accounting, when enabled and retained. Access commonly requires root, for examplesudo lastb.- Shell history: Files such as a user’s
~/.bash_historyare user-controlled, may be disabled, and do not prove that every command ran successfully. - auditd: Optional kernel audit records in
/var/log/audit/audit.log. Query login-related records withsudo ausearch -m USER_LOGIN; audit rules and retention determine what is available.
Compare accepted or failed SSH entries with last, lastb, journal records, and auditd data when present. Differences are useful clues: each subsystem has its own filters, clocks, rotation policy, and failure modes.
How OpenSSH and rsyslog decide where messages go
sshd_config controls what the daemon emits
OpenSSH exposes LogLevel and SyslogFacility in sshd_config, usually under /etc/ssh/sshd_config or an included configuration directory. LogLevel controls detail; SyslogFacility labels the messages for the logging system. A restrictive level can omit useful diagnostics, while an unnecessarily verbose level can increase noise and storage use.
Best Value
Inspect the effective configuration rather than relying only on comments in the file:
sudo sshd -T | grep -E 'loglevel|syslogfacility'
After any configuration change, validate syntax before restarting:
Free tools Windows power users keep installed
One-click scans. No signup required.
sudo sshd -t
sudo systemctl reload sshd
On Debian or Ubuntu, the service may be named ssh, so use sudo systemctl reload ssh when that is the installed unit. Keep an existing administrative session open while testing a reload or restart so a mistake does not lock you out.
rsyslog rules route facilities to files
rsyslog receives the facility-tagged messages and applies rules under locations such as /etc/rsyslog.conf and /etc/rsyslog.d/. Those rules are why one distribution writes authentication messages to auth.log and another writes them to secure. A local rule can redirect, duplicate, filter, or discard records.
When changing rsyslog rules, validate the configuration and reload the service according to the distribution’s procedure. Then generate a controlled test, such as one deliberate failed login from an approved administration address, and verify where the event appears. Avoid testing with repeated password guesses against a production account.
Rotation, retention, and centralized collection
Text logs are commonly rotated, renamed, compressed, and eventually deleted by a local policy. Journald can be volatile or persistent and can reclaim space according to size and time limits. Consequently, “the log file” is a moving set of records, not necessarily one file that contains the server’s entire history.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesFor a high-risk or internet-facing server, forward authentication events to a separate, access-controlled collector. Local attackers with root access can alter or delete local files, and an attacker who gains control of the host may also influence its journal and login databases. Central collection does not replace local verification, but it preserves a second copy with independent retention and access controls.
A practical troubleshooting sequence
- Identify the distribution and init system. Confirm whether the host is Debian/Ubuntu, RHEL-family, Fedora, or another systemd distribution.
- Try the conventional file. Use
/var/log/auth.logon Debian/Ubuntu and/var/log/secureon RHEL-family systems. - Query both journal unit names. Run
journalctl -u sshandjournalctl -u sshdwith a time range. - Check services and file presence. Compare
systemctl is-active systemd-journald,systemctl is-active rsyslog, andls -lon the expected paths. - Check rotated records and older boots. List wildcard text-log files and use
journalctl --list-bootsbefore declaring an event missing. - Broaden the evidence. Consult
last,lastb, and auditd only when the question requires session accounting or broader audit evidence. - Preserve what you find. Export relevant journal entries and copy log files to controlled storage before they rotate or are overwritten.
Choosing the right source for the question
| Question | Best first source | Important limitation |
|---|---|---|
| Did an SSH password or key attempt fail? | /var/log/auth.log, /var/log/secure, or the SSH journal unit |
Retention and LogLevel may omit older or lower-detail events. |
| Was an SSH authentication accepted? | Authentication text log or journalctl -u sshd/ssh |
An accepted login does not show what the user did afterward. |
| Which recorded users logged in and when? | last and wtmp |
Login accounting is separate from daemon messages and can be incomplete. |
| Which failed logins were recorded by the accounting subsystem? | lastb and btmp |
Requires the database to exist and be retained. |
| Which audited login events exist? | ausearch -m USER_LOGIN against auditd data |
Audit rules, permissions, and rotation determine coverage. |
The dependable starting rule is simple: use the distribution’s conventional file when rsyslog is present, use the SSH service’s journal when it is not, and treat auditd and login databases as complementary evidence rather than substitutes.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




