Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to change a telnet login prompt of Debian 4.0 server. Currently it is of form:

hostname login:

I need to have just:


Apparently chnages to /etc/ only influence what is displayed before "login prompt" not the actual prompt.


share|improve this question
For the love of all that is good and holy, don't use telnet. SSHd is a much more secure and much more functional alternative. – EEAA Nov 24 '10 at 14:33
I am well aware of security implications when using plain text protocol such as telnet, thank you! But I am dealing with a closed commercial product which relies on telnet being enabled. And by no means Debian server is exposed to unsecure networks such as Internet :) – JasonPa112 Nov 25 '10 at 11:51

The -h argument controls printing of hostname at login prompt:

-h   Disables the printing of host-specific information before login has been completed.

You should add this option to corresponding line in your /etc/inetd.conf, like:

telnet          stream  tcp     nowait  telnetd /usr/sbin/tcpd  /usr/sbin/in.telnetd telnetd -h
share|improve this answer
OK, this looks promising, but it does not actually have an effect. I changed inetd.conf as you suggested, restarted inetd service, but still i get hostname in login prompt. I did try to run in.telnetd with "-h -debug" options from command line (inetd was disabled) nad still the same result. Perhaps telnetd is ignoring -h option. – JasonPa112 Nov 24 '10 at 10:18
Oh. That's because /usr/lib/telnetlogin, which is used by Debian to allow running telnet as nobody, ignores all relevant options (and its manpage says it is, quoted, "EXPERIMENTAL CODE"). I'll take a look at other options. – whitequark Nov 24 '10 at 10:25
I tried installing "inetutils-telnetd" package. In case of telnetd from this packahe "-h" has actually an effect, but only to what is printed before login prompt. Basically with -h on, it will not print host information (like Linux version, hostname tty etc). – JasonPa112 Nov 24 '10 at 10:29
I tried that, too. inetutils-telnetd uses system login, which does not have -h option too. – whitequark Nov 24 '10 at 11:25
Well, looks like there is no way to do this in Debian without recompiling any of packages handling login (login, regular telnetd), which I would not recommend because of update and security reasons. I've thought about filtering login output somehow with a wrapper, but I don't think it is possible to do that without affecting the output of programs running inside the shell, which is not desirable I think. – whitequark Nov 25 '10 at 3:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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