PDA

View Full Version : telnet prompt issue



thesunlover
06-Jan-2014, 21:11
Hi, I have a simple question about telnet. The current telnet login prompt is "hostname login:". How can I remove the hostname from the prompt and make it only show "login:"? Thank you in advance!

jmozdzen
07-Jan-2014, 12:36
Hi thesunlover,

Hi, I have a simple question about telnet. The current telnet login prompt is "hostname login:". How can I remove the hostname from the prompt and make it only show "login:"? Thank you in advance!

from man telnetd:


-H Instruct the login program to suppress printing the hostname before the prompt.

Regards,
Jens

mikewillis
07-Jan-2014, 13:40
First, read the comments in /etc/init.d/xinetd which explain why you shouldn't use telnet. I hope you're not using it to log in from anywhere other than your network. Then add this line to /etc/init.d/xinetd

server_args = -h -H
The restart xinetd


$ service xinetd restart

Before

me@mine:~> telnet 172.16.54.133
Trying 172.16.54.133...
Connected to 172.16.54.133.
Escape character is '^]'.
Welcome to SUSE Linux Enterprise Desktop 11 SP3 (x86_64) - Kernel 3.0.101-0.8-default (2).

localhost login:

After:

me@mine:~> telnet 172.16.54.133
Trying 172.16.54.133...
Connected to 172.16.54.133.
Escape character is '^]'.

login:

ab
07-Jan-2014, 13:45
And for those (like me) too lazy to type -H over and over:

Code:
--------------------
echo "alias telnet='telnet -H'" >> ~/.alias
--------------------

Hopefully this goes without saying, but telnet should never be used
anymore. It's been replaced by a dozen other, and secure, tools. telnet
makes sniffing passwords as easy as it gets, and there are no workarounds
there so if anything you do via telnet matters, please stop.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...

jmozdzen
07-Jan-2014, 14:04
Hi ab,

it was about the server, not the client ;)

Regards,
Jens