How to remove the hostname from telnet-server prompt in RHEL 6 prior to logging in

Solution Verified - Updated -


  • Red Hat Enterprise Linux (RHEL) 6
  • telnet-server
  • util-linux-ng


  • Login using telnet is displaying hostname
  • How can I remove the hostname from the telnet prompt and make it only show

instead of

hostname login:


As noted below, telnet-server should be discontinued in favour of more secure mechanisms. However, the following procedure can be used to omit the hostname in login prompt.

Update to util-linux-ng-2.17.2-12.28.el6_9.2 released with Advisory RHBA-2018:0175 or newer.

Add a configuration line


to /etc/login.defs configuration file.

Root Cause

Warning: The telnet-server package is inherently insecure and should not be used in any environment that has any expectation of security. All data transferred from client to server is transmitted in plaintext. It should not be used in favour of more secure mechanisms such as ssh.

Prior to this update, the system login prompt always included the host name when connecting over the telnet protocol. Consequently, if the screen was too small, a part of the prompt extended beyond the edge of the screen. This update introduces a new option in the /etc/login.defs configuration file to change the login prompt and hide the host name. As a result, users are able to see their login information even on small screens.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.