How to control the login messages of /etc/issue on one ssh session

Solution Verified - Updated -

Issue

  • When using ssh to log in to a sshd server, the following messages are output:
For RHEL6 server:
# ssh root@rhel
Red Hat Enterprise Linux Server release 6.10 (Santiago)
Kernel \r on an \m

root@rhel's password: 

For RHEL7 / RHEL8 / RHEL9 server:
# ssh root@rhel
\S
Kernel \r on an \m

root@rhel's password: 

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • 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