Show the last 50 SSH unit messages without a pager.
journalctl -u ssh -n 50 --no-pagerRead systemd journal entries. Use -u to filter by service unit.
journalctl [OPTIONS...] [MATCHES...]Show the last 50 SSH unit messages without a pager.
journalctl -u ssh -n 50 --no-pagerShow warning and more severe messages from this boot.
journalctl -b -p warning| Option / clause | Description |
|---|---|
-u, --unit=UNIT | Show messages for a systemd unit. |
-f, --follow | Follow new journal entries. |
-b, --boot[=ID] | Show entries from the current boot or a selected boot. |
-n, --lines=N | Show the most recent N entries. |
--since=TIME / --until=TIME | Restrict entries to a time range. |
-p, --priority=LEVEL | Filter by priority and more severe levels. |
--no-pager | Write output directly instead of opening a pager. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.