Get the App
SLTechnology News&Howtos  ›  Development  › 

How to open telnet service under Linux

Shulou Source: shulou.com Published: 2022-06-01 22:35:40 10月01日 Update

This article will explain in detail how to open telnet service under Linux, Xiaobian thinks it is quite practical, so share it with you as a reference, I hope you can gain something after reading this article.

When we want to remotely access a switch, etc., we need telnet protocol.

Step 1: Check the local telnet server operating environment

Step 2: Query whether telnet service has been installed on this server. Two commands: rpm-qa telnet

Rpm-qa telnet-server or a command: rpm-qa| egrep"telnet| telnet-server"

Step 3: Query whether telnet service of this server is enabled. Use the command: /etc/init.d/xinetd status to check.

See? Everything's normal. What's the problem?

At this time I Baidu once found a post is very useful:

http://jingyan.baidu.com/article/54b6b9c0fc370b2d593b477a.html

The fifth point in it states that the telnet service configuration file needs to be modified.

Step 4: Change disable=yes to disable=no with vi /etc/xinetd.d/telnet

I looked at the command cat /etc/xinetd.d/telnet

Use the command vi /etc/xinetd.d/telnet

Change disable=yes to disable=no

Then restart using the command/etc/init.d/xinetd

Then try telnet locally using telnet 127.0.0.1

Then there are the following two error messages, I looked up on the Internet for a long time, read two posts, understand, the server host name problem (/etc/sysconfig/network) inside, it and the local (/etc/hosts) file in the current local host name, there is a host name printed using the hostname command are not the same, but the host name of these three places must be the same.

I use cat command to check cat /etc/sysconfig/network one by one

Command:cat /etc/hosts

Command:hostname

Step 5: Found the problem, the names of these three places are really different, should be changed to hostname command out of the host name (c58-nfs-server) mainly, this is real-time, so I made changes one by one.

Step 6: Reactivate telnet service. Then use the command telent127.0.0.1 and finally succeed.

About "how to open telnet service under Linux" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.

Tags: Commands services hosts servers articles questions three places files more posts queries good practical successful two switches messages content names Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info OPPO Reno NVidia macOS Linux