Weblog entry #6 for trakic
# grep Port sshd_config
#Port 22
Port 2022
# curl -I http://localhost:443
SSH-2.0-OpenSSH_5.5p1 Debian-4
Protocol mismatch.
curl: (56) Recv failure: Connection reset by peer
Q: How do I disable shouting out version number?
-Admir Trakic
Comments on this Entry
If you look around I remember seeing a patch when I looked into it about a year ago that would remove the version number but I wouldn't necessarily recommend using it.
[ Parent | Reply to this comment ]
Also I have also discoved dropbear spits out version number as well:
curl -I http://192.168.1.20:22
SSH-2.0-dropbear_0.52
To be honest, if this banner really cannot be disabled, I find disabling PrintMotd, DebianBanner options a bit obsolete.
Admir Trakic
[ Parent | Reply to this comment ]
Whatever you may think, the OpenBSD and OpenSSH teams do have a good reputation for security. I think they are just sticking to the security through obscurity is no security at all, so learn to live with it.
Personally I don't like the idea of standing on the roof and shouting, but running SSH and hiding the version isn't getting you as much security as you think it is...
--
"It's Not Magic, It's Work"
Adam
[ Parent | Reply to this comment ]
Sure, you can also try add some tunneling configuration, eg. SSH over HTTP(S), but this would require more services running and additional client configuration.
So if possible, I would really like to see this banner disabled, prefferebly by adjusting main configuration file, and also by not patching the original package.
-Admir Trakic
[ Parent | Reply to this comment ]
So obviously I have to stick with SSH tunneling over HTTP(S).
-Admir Trakic
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Edit version.h
#define SSH_VERSION "asd"
#define SSH_RELEASE "asd"
./configure --prefix=/usr --sysconfdir=/etc
make -j8
make install
/etc/init.d/ssh restart
And you will get:
Connected to x.x.x.x
Escape character is '^]'.
SSH-2.0-asd
But you must put in a string as version, otherwise the client won't connect with this error:
"Bad remote protocol version identification: 'SSH-2.0-"
[ Parent | Reply to this comment ]