Override SSH message when accessed via HTTP
Solution 1:
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:
SSH-2.0-OpenSSH_5.9p1
You should not disable this as it's required to negotiate the SSH protocol connection.
Solution 2:
There is a Banner option in /etc/ssh/sshd_config:
The contents of the specified file are sent to the remote user before authentication is allowed. If the argument is “none” then no banner is displayed. This option is only available for protocol version 2. By default, no banner is displayed.
This way you cannot remove the version string, but is very handy to use it to provide legal information.