1

I'm trying to secure my Debian server, and noticed that if I type telnet myserverip port# then anyone can see my ssh version. I'm a bit worried that people can do some harm aside from that. How can I make it so that my server refuses any telnet related requests? I googled around, but most sites tell me to modify my init.d file, but there is no telnet service in the first place. I'm sure I'm misunderstanding some things about telnet and how it works so sorry if that's the case.

  • Being able to use the telnet utility to connect to a remote port does not mean that remote server has telnet running. From your description, it sounds like you're connecting to port 22, and getting sshd's banner. You cannot disable this, and you shouldn't either as the version number is used to ensure compatibility between client & server. – Patrick Sep 22 '14 at 4:49
  • oh I see. Thank you for your help. I'm still learning how to do all this – Painguy Sep 22 '14 at 5:16
2

SSH is a TCP service and there is no way to realize whether the client is telnet or whatever. If you want to hide your system version and/or system architecture, you can try for instance:

http://en.wikipedia.org/wiki/Port_knocking

Or, it's simple to recompile openssh with your own "version". AFAIR there is a header file which contains #define witch you can change. It shouldn't be difficult to find. Just grep the sources.

  • This is actually pretty useful. Thank you. – Painguy Sep 22 '14 at 7:17
0

If you're not going to use it why not unistall it?

apt-get --purge remove openssh-server

If you don't want to uninstall it you can disable its automatic startup with

update-rc.d -f sshd remove

Or you can do what smrt28 sugested and can compile it yourself changing the version so that it will be more difficult to identify it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.