how to turn off the banner "SSH-2.0-OpenSSH_5.2"?

how to turn off the banner "SSH-2.0-OpenSSH_5.2"?

I am using RedHat Advanced Server 4

#telnet localhost 22
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.2

A quick search for "openssh disable banner" told me this:

SSH-2.0-OpenSSH_5.2

The bold part has to present as it identifies which versions of the SSH protocol this server understands: 1.5 = SSHv1 only, 1.99 = SSHv1/2, 2.0 = SSHv2 only
The italic part is customizeable by editing version.h inside the OpenSSH source tree.
Source

in /etc/default folder there is a file telnetd.

when you edit it
you will find the banner msg

like
BANNER="BLA BLA"

just remove it
BANNER=""

save the file you will not receive any msg while login

And what exactly is the connection between a configuration file for telnet(d) and SSH?

Exactly, it's the login message. The banner above is sent by the SSH server to identify itself, long before any party even starts authentication (even before the session keys are negotiated)