In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
CentOS system how to install Telnet, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
What is Telnet?
Telnet is a protocol used to remotely log in to a computer over a TCP/IP network. Once a connection is established with the remote computer, it becomes a virtual terminal and allows you to communicate with the remote computer.
In this tutorial, we will show you how to install Telnet and how to access remote systems through Telnet.
Installation
Open the terminal and enter the following command to install telnet:
The code is as follows:
Yum install telnet telnet-server-y
Now telnet is installed on your server. Next, edit the file / etc/xinetd.d/telnet:
The code is as follows:
Vi / etc/xinetd.d/telnet
Set disable = no:
The code is as follows:
# default: on
# description: The telnet server serves telnet sessions; it uses\
# unencrypted username/password pairs for authentication.
Service telnet
{
Flags = REUSE
Socket_type = stream
Wait = no
User = root
Server = / usr/sbin/in.telnetd
Log_on_failure + = USERID
Disable = no
}
Save and exit the file. Remember, we don't have to do this in CentOS 7.
Next, restart the telnet service using the following command:
In CentOS 6.x systems:
The code is as follows:
Service xinetd start
Let the service start every time it is restarted:
On CentOS 6:
The code is as follows:
Chkconfig telnet on
Chkconfig xinetd on
On CentOS 7:
The code is as follows:
Systemctl start telnet.socket
Systemctl enable telnet.socket
Allow the default port 23 of telnet to pass through the firewall and router. To make the telnet port accessible through the firewall, edit the following file on the CentOS 6.x system:
The code is as follows:
Vi / etc/sysconfig/iptables
Add the following line "- An INPUT-p tcp-m state-- state NEW-- dport 23-j ACCEPT":
The code is as follows:
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
* filter
: INPUT ACCEPT [0:0]
: FORWARD ACCEPT [0:0]
: OUTPUT ACCEPT [0:0]
-An INPUT-m state-- state ESTABLISHED,RELATED-j ACCEPT
-An INPUT-p icmp-j ACCEPT
-An INPUT-I lo-j ACCEPT
-An INPUT-p tcp-m state-- state NEW-- dport 23-j ACCEPT
-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 22-j ACCEPT
-An INPUT-j REJECT-- reject-with icmp-host-prohibited
-A FORWARD-j REJECT-- reject-with icmp-host-prohibited
COMMIT
Save and exit the file. Restart the iptables service:
The code is as follows:
Service iptables restart
In CentOS 7, run the following command to allow the telnet service to pass through the firewall.
The code is as follows:
Firewall-cmd-permanent-add-port=23/tcp
Firewall-cmd-reload
okay. The telnet service is now available for use.
Create a user
Create a test user, such as the user name "sk" and the password "centos":
The code is as follows:
Useradd sk
Passwd sk
Client configuration
Install the telnet package:
The code is as follows:
Yum install telnet
In DEB-based systems:
The code is as follows:
Sudo apt-get install telnet
Now, open the terminal and try to access your server (remote host).
If your client is a Linux system, open the terminal and enter the following command to connect to the telnet server.
The code is as follows:
Telnet 192.168.1.150
Enter the username and password that has been created on the server:
Sample output:
The code is as follows:
Trying 192.168.1.150...
Connected to 192.168.1.150.
Escape character is'^]'.
Kernel 3.10.0-123.13.2.el7.x86_64 on an x861464
Server1 login: sk
Password:
[sk@server1 ~] $
As you can see, the remote host has been successfully accessed locally.
If your system is windows, go to start-> run-> Command prompt.
At the command prompt, enter the command:
The code is as follows:
Telnet 192.168.1.150
192.168.1.150 is the remote host IP address.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.