Override SSH message when accessed via HTTP

Oscar Mederos asked:

If you access my server via HTTP using the SSH port (22), you’ll see a message like this:

SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1

Could be possible to display a different message?

My answer:

The Debian/Ubuntu version identification is a Debian-ism which isn’t present in standard OpenSSH.

You can disable it by setting DebianBanner no in /etc/ssh/sshd_config.

The end result will be:


You should not disable this as it’s required to negotiate the SSH protocol connection.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.