On macOS 14.5, the sshd process logs connection details to the system console rather than your terminal window. When you run ssh localhost, the server side outputs session data to /var/log/system.log or via the log stream command. This behavior is standard for background services and indicates that your SSH daemon is functioning correctly.
Distinguishing Client Output from Server Logs
When you execute an SSH command in your terminal, such asssh user@localhost, you are interacting with the client-side application. The immediate output you see on your screen—like "Welcome to Ubuntu" or a password prompt—comes from the SSH client process, not the server. However, the actual authentication and session establishment happen on the server side, managed by the sshd daemon.
On macOS, sshd runs as a background service. It does not print its activity directly to your active terminal session unless you are running it manually in the foreground, which is rare for general users. Instead, macOS routes these events through the Unified Logging System. This means that if you want to verify that your SSH connection was accepted and processed, you must look at the system logs, not the terminal where you initiated the command.
Understanding this separation is crucial for troubleshooting. If you suspect that a connection failed but the client seems to hang, checking the server logs will reveal whether the packet even reached the sshd process. For more complex connectivity issues, you might also need to check how your shell handles missing commands, as seen in Fixing zsh: command not found: ssh -Y on Mac Terminal.
Viewing SSHd Activity via Console.app
The most user-friendly way to viewsshd output on macOS is using the Console application. This tool provides a graphical interface to the Unified Logging System. To find SSH-related messages, open Console.app from your Applications folder. Once open, ensure that your local machine is selected in the left-hand sidebar under "My Computer."
In the search bar at the top right of the Console window, type sshd. This filters the log entries to show only those generated by the SSH daemon. You can also include keywords like session or auth to narrow down the results. Look for lines that mention "Accepted publickey" or "Accepted password." These entries confirm that the server recognized your credentials and opened a secure channel.
You should also check for error messages such as "Connection closed by authenticating user." If you see repeated failures here, it indicates that the client is reaching the server, but the authentication is failing. This could be due to incorrect permissions on your .ssh directory or invalid keys. Resolving these permission issues often involves resetting the ownership of your home directory's hidden files.
Using the Log Stream Command for Real-Time Monitoring
For developers and advanced users who prefer the command line, thelog stream utility offers real-time monitoring of system events. This method is particularly useful when you are actively testing a connection and want to see the server's reaction instantly without switching windows. Open a new terminal window and enter the following command:
log stream --predicate 'process == "sshd"' --info
This command tells macOS to filter logs where the process name is exactly sshd and to display informational level messages. As you initiate an SSH connection in another terminal tab, you will see live updates appear here. You might see entries indicating a new connection attempt, followed by authentication success or failure.
If you want to follow the logs continuously, add the --style compact flag to reduce clutter. This approach allows you to correlate client actions with server responses precisely. Note that if you do not see any output, ensure that your system logging level is set to include informational messages. Sometimes, aggressive privacy settings or custom logging configurations may suppress these details.
Interpreting Common Log Entries
When reviewing these logs, certain phrases have specific meanings. "Server listening on 0.0.0.0 port 22" indicates that the daemon is ready to accept connections. "Connection from [IP address]" shows who is trying to connect. "Received disconnect" marks the end of a session. Understanding these timestamps helps you diagnose latency or dropped connections.Troubleshooting Silent Failures
Sometimes, SSH connections fail silently, meaning the client hangs indefinitely. In such cases, thesshd logs are your primary diagnostic tool. Check if the server received the request at all. If there are no log entries corresponding to your connection attempt, the issue likely lies in network configuration, firewall settings, or DNS resolution.
Ensure that the SSH service is enabled in System Settings under Sharing. On macOS 14.5, this setting controls whether sshd starts automatically at boot. If the service is disabled, no amount of log inspection will help because the process is not running. Additionally, verify that your firewall is not blocking port 22.
For users experiencing passphrase prompts after system updates, refer to macOS Asks for SSH Passphrase after Update in Sonoma. Keychain changes can sometimes interfere with how sshd validates identities, leading to unexpected behavior.
Managing SSH Sessions Properly
When you close an SSH session, thesshd process logs the disconnection. It is important to terminate sessions cleanly to free up resources. Hanging connections can accumulate and consume memory. Use exit within the SSH session or press Ctrl+D to send an EOF signal.
If you have established an SSH tunnel, remember to close it properly to avoid port conflicts. Improperly closed tunnels can leave ports bound, preventing new connections. Learn the correct methods for terminating these links by reading Correct Way to End SSH Tunnel.
Finally, consider how system changes affect your SSH environment. Changing your Mac's hostname can impact key generation and trust relationships. Always update your known hosts file if you rename your machine to prevent security warnings. See Does Changing a Mac's Name Affect Its SSH Key? for details on maintaining consistency across system updates.
Frequently Asked Questions
Why doesn't my terminal show SSHd output?
The terminal displays output from the SSH client, while the server logs are stored separately in the system journal. To see server-side activity, you must query the system logs using Console.app or the log stream command.
How do I enable verbose logging for SSHd?
You can increase the verbosity by modifying the LogLevel directive in /etc/ssh/sshd_config. Setting it to DEBUG will produce detailed output in the system logs, helping you diagnose complex authentication issues.
Can I disable SSHd logging entirely?
While you can adjust the log level to minimize output, completely disabling logging is not recommended for security reasons. It prevents you from detecting unauthorized access attempts or diagnosing connection problems effectively.
What does "Accepted publickey" mean in the logs?
This message indicates that the SSH server successfully validated your public key against the authorized keys file. It confirms that you have passed the authentication phase and are allowed to proceed with the session.
How do I check if SSHd is running on macOS 14.5?
Use the command sudo launchctl list | grep sshd to check the status of the SSH service. Alternatively, check System Settings under Sharing to see if Remote Login is toggled on, which ensures the daemon starts automatically.