Error messages "sshd-keygen@.service: Main process exited" and "Failed to start OpenSSH sshd-keygen Server Key Generation" in /var/log/messages after reboot on RHEL 8

Solution Verified - Updated -

Issue

  • After a system reboot, the /var/log/messages file contains error messages similar to the following, associated with sshd-keygen@.service:

    systemd[1]: sshd-keygen@sshd-keygen.service: Main process exited, code=exited, status=12/n/a
    systemd[1]: sshd-keygen@sshd-keygen.service: Failed with result 'exit-code'.
    systemd[1]: Failed to start OpenSSH sshd-keygen Server Key Generation.
    

Environment

  • Red Hat Enterprise Linux 8
  • systemd
  • openssh-server

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content