sshd daemon hangs while processing sshd_config when the size of the file is larger than 256kb

Solution Verified - Updated -

Issue

  • Unable to login to machine via ssh and below error log gets written to /var/log/secure.

    sshd[X]: error: ssh_msg_recv: read: bad msg_len 262169
    
  • On the client side, the ssh process hangs forever.

Environment

  • Red Hat Enterprise Linux (RHEL) 7
  • Red Hat Enterprise Linux (RHEL) 8
  • openssh

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