Linux using the telnet command method

  

When you are doing Linux remote server related operations, you will use the telnet command, telnet command can also do other purposes, the system home will introduce you to the Linux telnet command usage.

telnet command is typically used for remote login. The telnet program is a remote login client program based on the TELNET protocol. The Telnet protocol is a member of the TCP/IP protocol suite and is the standard protocol and main method for Internet remote login services. It provides users with the ability to do remote host work on a local computer. Use the telnet program on the end user's computer and use it to connect to the server. End users can enter commands in the telnet program, which will run on the server as if they were entered directly on the server's console. The server can be controlled locally. To start a telnet session, you must enter your username and password to log in to the server. Telnet is a common method of remotely controlling a web server.

However, because telnet uses plain text to transmit messages, security is not good. Many Linux servers do not open telnet services, but switch to a more secure ssh mode. However, there are still many other systems that may use telnet to provide remote login, so it is still necessary to understand how the telnet client is used.

The telnet command can also be used for other purposes, such as determining the status of a remote service, such as determining if a port on a remote server can be accessed.

1. Command format:

telnet[parameter][host]

2. Command function:

Execute the telnet command to start the terminal phase operation and log in to the remote host.

3. Command parameters:

-8 8-bit character data is allowed, including input and output.

-a Try to log in to the remote system automatically.

-b "Host Alias" Use an alias to specify the remote host name.

-c Does not read the .telnetrc file in the user-specific directory.

-d Starts the troubleshooting mode.

-e "Off Character" Sets the escape character.

-E Filter out the escape character.

-f The effect of this parameter is the same as the specified “-F” parameter.

-F When using Kerberos V5 authentication, this parameter can be used to upload the authentication data of the local host to the remote host.

-k "Domain Name" When using Kerberos authentication, add this parameter to let the remote host adopt the specified domain name instead of the host's domain name.

-K Does not automatically log in to the remote host.

-l "User Name" Specify the name of the user to log in to the remote host.

-L Allows output of 8-bit character data.

-n "Record File" Specify information about the file record.

-r Use a user interface similar to the rlogin directive.

-S "Service Type" Set the IP TOS information required for telnet connection.

-x Suppose the host has the ability to support data encryption and use it.

-X "Authentication Form" Close the specified authentication form.

4. Example:

Instance 1: The remote server cannot access

Command: telnet 192.168.120.206

Output:

The code is as follows:

[root@localhost ~]# telnet 192.168.120.209

Trying 192.168.120.209. .

telnet: connect to address 192.168.120.209: No route to host

telnet: Unable to connect to remote host: No route to host

[root@localhost ~] #

Description:

To handle this situation:

(1) Is the ip address correct?

(2) Confirm that the host corresponding to the ip address is turned on?

(3) If the host has been started, confirm that the routing settings are set correctly? (Use the route command to view)

(4) If the host has been started, confirm whether the telnet service is enabled on the host? (Use the netstat command to check whether the TCP port 23 has the LISTEN status line)

(5) If the host has started the telnet service, confirm whether the firewall has opened the 23 port access? (Use iptables-save to view)
Previous123Next page Total 3 pages

Copyright © Windows knowledge All Rights Reserved