Use of Linux telnet command

Use of Linux telnet command

1. Introduction

The telnet command is used to log in to a remote host. It is a remote login program based on the Telnet protocol and is used to manage the remote host. Because telnet uses plain text to transmit messages, its security is poor. Therefore, many Linux servers do not provide telnet services and use the more secure ssh method instead. But there are still many other systems that may use telnet to provide remote login, so it is still necessary to figure out how to use the telnet client.

The telnet command can also be used for other purposes, such as determining whether a port on a remote server is accessible.

In addition, the Telnet protocol is a member of the TCP/IP protocol family and a standard protocol for Internet remote login services. It is an application layer protocol and is used to implement remote login based on the TCP protocol.

2. Command format

netstat [-8EFKLacdfrx] [-X authtype] [-b hostalias] [-e escapechar] [-k realm] [-l user] [-n tracefile] [host [port]]

3. Option Description

-8: Allows the use of 8-bit character data, including input and output -a: Attempts to automatically log in to the remote system;
-b <hostalias>: Use an alias to specify the name of the remote host -c: Do not read the .telnetrc file in the user's dedicated directory -d: Start debugging mode -e <escapechar>: Set the escape character -E: Filter escape characters -f: The effect of this parameter is the same as specifying the "-F" parameter -F: When using Kerberos V5 authentication, adding this parameter can upload the authentication data of the local host to the remote host -k <realm>: When using Kerberos authentication, adding this parameter allows the remote host to use the specified domain name instead of the domain name of the host to obtain the ticket -K: Do not automatically log in to the remote host -l <user>: Specify the user name to log in to the remote host -L: Allow the output of 8-bit character data -n <tracefile>: Specify a file to record related information -r: Use a user interface similar to the rlogin command -x: Assuming the host has support for data encryption, use it -X <atype>: Turn off the specified authentication type.

4. Common Examples

(1) Log in to the host.

telnet 192.168.0.5

(2) Confirm whether a port on the remote server is available. For example, check whether port 22 of the remote server's ssh service is open.

$ telnet 10.234.178.144 22
Trying 10.234.178.144...
Connected to 10.234.178.144.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.0

5. Common commands of Telnet client

auth <argument> [...]: View and manage telnet login authentication methods. The possible values ​​for argument are: disable, enable and status
close: Close the current Telnet connection display: Use the display command to view the current settings of the Telnet client logout: Similar to the cloase command, used to close the Telnet connection or suspend it. Note: The Telnet server may not support open <host> [-l user] [[-] port]: Establish a Telnet connection to the specified host send <arguments>: Use the send command to send a specific string to the Telnet server. Support includes but is not limited to the following command strings:
	abort: terminate service command ao: Abort Output, abandon output command ayt: Are you there command brk: Break command eof: send End Of File character escape: send the current escape character, initially the grouping character ^].
	ip: interrupt process command synch: execute Telnet synchronization operation.
quit: Exit the Telnet client.
status: Displays the current Telnet connection status

The above is the detailed content of the use of Linux telnet command. For more information about Linux telnet command, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Detailed explanation of memcache operation under telnet (detailed explanation of operation commands)
  • Brief analysis of memcache startup and telnet command explanation
  • Complete guide on how to use the telnet command

<<:  Let's talk about the characteristics and isolation levels of MySQL transactions

>>:  How does Zabbix monitor and obtain network device data through ssh?

Recommend

How to configure anti-hotlinking for nginx website service (recommended)

1. Principle of Hotlinking 1.1 Web page preparati...

Teach you how to build Tencent Cloud Server (graphic tutorial)

This article was originally written by blogger We...

How to implement dual-machine master and backup with Nginx+Keepalived

Preface First, let me introduce Keepalived, which...

Ubuntu installation cuda10.1 driver implementation steps

1. Download cuda10.1: NVIDIA official website lin...

Use CSS to switch between dark mode and bright mode

In the fifth issue of Web Skills, a technical sol...

Vue.js uses Element-ui to implement the navigation menu

This article shares the specific code for impleme...

The whole process record of Vue export Excel function

Table of contents 1. Front-end leading process: 2...

Superficial Web Design

<br />I have always believed that Yahoo'...

In-depth understanding of Vue's data responsiveness

Table of contents 1. ES syntax getter and setter ...

How to install and configure Redis in CentOS7

Introduction There is no need to introduce Redis ...

Install and use Git and GitHub on Ubuntu Linux

Introduction to Git Git is an open source version...

A brief discussion on the magical slash in nginx reverse proxy

When configuring nginx reverse proxy, the slashes...

How to view and set the mysql time zone

1. Check the database time zone show variables li...

Flex layout realizes left text overflow and omits right text adaptation

I want to achieve a situation where the width of ...