The ssh server doesn't escape the sequence characters in the banner file.

Solution Verified - Updated -

Issue

  • I specified a banner file in /etc/ssh/sshd_config so that the banner would be displayed when logged in remotely via ssh.

    Banner /etc/issue.net
    
  • I was expecting to see the OS version and other information, but the text in the banner file was displayed as follows.

    $ ssh testuser@testserver
    \S
    Kernel \r on an \m
    Last login: Tue Mar 23 08:59:23 2021 from 10.99.1.143
    

Environment

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