Telnet commands and logon

Source: Internet
Author: User
Tags dedicated server

Although the use of the Telnet service has many security problems. However, Telnet is an important protocol for remote logon and the simplest protocol. Then we will analyze the use of Telnet. Telnet is the standard protocol and main method for remote logon. It provides users with the ability to complete remote host work on local computers. by using Telnet, Internet users can contact many information center libraries and other information resources around the world. there are two main scenarios for Telnet remote logon. first, the user has his/her Account on the remote master wish, that is, the user has the registered user name and password; the second is that many Internet hosts provide users with some form of public Telnet information resources, which are open to every Telnet user. telnet is one of the simplest Internet tools.

Telnet command

The supported commands are:

C-close the current connection

D-display operation parameters

O-open the host name [port] and connect to a host name (default port 23)

Q-exit the Telnet Service

Set-set setting options (to list, Type \ 'set? \')

Sen-Send the string to the server

St-status print status information

U-Undo settings unset options (to list, Type \ 'unset? \')

? /H-Help print help information

Remote Login

Although the Telnet service is also a client/server model service, it is more significant in implementing remote login and remote interactive Computing Based on the Telnet service ), so let's get to know about remote logon.

1. Basic concepts of Remote Login

First, let's take a look at what is Logon: the time-sharing system allows multiple users to use a computer at the same time. To ensure system security and ease of accounting, the system requires each user to have a separate account as the logon ID, the system also specifies a password for each user. before using the system, you must enter the ID and password. This process is called \ 'logon \'.

Remote Login refers to the process in which a user uses Telnet commands to temporarily turn his computer into a simulation terminal of the remote host. the simulation terminal is equivalent to a non-intelligent machine. It is only responsible for passing each character entered by the user to the host, and then displaying each information output by the host on the screen.

2 Remote Login generation and development

We can first create a service that provides remote text editing. The implementation of this service requires a server that accepts file editing requests and data, and a client that sends this request. the client will establish a TCP connection from the local machine to the server. Of course, this requires the server to respond and then send the entered information file to the server to edit the information) and read the output from the server. the above is a standard and common client/server model service.

It seems that with the client/server model service, all remote problems can be solved. however, it is not as simple as you think. If we only need to edit files remotely, the service we just proposed is fully qualified, but if our requirements are not that simple, we also want to implement remote user management, remote data entry, remote system maintenance, and all operations that can be performed on the remote host, then we will need a large number of dedicated server programs and use a server process for every computing service. The problem that comes with it is that remote machines will soon be overwhelmed by server processes, and we excluded the most specialized remote machines from the ocean of processes ).

Is there a solution? Of course, we can use remote logon to solve all this problem. we allow users to create a login session on a remote machine and execute commands to implement more general services, just like local operations. in this way, we can access all the available commands on the remote system, and the system designer does not need to provide multiple dedicated server programs.

The problem seems to have a bright future. Remote Login should solve the problem, but it is not easy to achieve remote login. regardless of the computer system designed by the network, you are expected to log on only from the directly connected keyboard and display. To add the remote login function to this computer, you need to modify the operating system of the machine, this is extremely difficult and we try to avoid it. therefore, we should concentrate on the construction of remote login server software, although this is also relatively difficult. why is it difficult to do so?

For example, the operating system assigns special meanings to some special buttons. For example, the local system interprets \ 'ctrl + C \ ': \ 'terminate the currently running command process \'. however, if we have run the remote login server software, \ 'ctrl + C \ 'may not be transferred to the remote machine, if the client actually uploads the \ 'ctrl + C \ 'command to the remote machine, the \ 'ctrl + C \' command may not be able to terminate the local process, that is to say, confusion may occur here. this is only one of the difficulties encountered.

However, despite the technical difficulties, system programmers managed to construct remote login server software that can be applied to most operating systems and constructed application software that acts as a client. generally, the client software removes the local interpretations of all keys except one key and converts these local interpretations into remote interpretations, this makes the interaction between the client software and the remote machine just like sitting in front of the remote host, thus avoiding the confusion mentioned above. the key with the only exception can bring the user back to the local environment.

The remote login server is designed as an application-level software. Another requirement is that the operating system must provide support for the pseudo terminal. we use a Pseudo Terminal to describe the entry point of the operating system. It allows programs like the Telnet server to send characters to the operating system and make the characters as if they were from a local keyboard. only when such an operating system is used can the remote login server be designed as application-level software such as Telnet server software). Otherwise, local and remote system transfer will not recognize the information transmitted from the other party because they can only identify the information typed from the local keyboard), remote login will fail.

Although the Design of Remote Login server as application-level software has significant advantages: it is easier to modify and control the server than to embed code into the operating system. however, the disadvantages of low efficiency will be explained later). Fortunately, the user's input speed is not high, and this design is acceptable.

3. Remote Logon

When using the Telnet service for remote login, the following conditions must be met: the computer must have a client program containing the Telnet protocol; the IP address or domain name of the remote host must be known; the logon ID and password must be known.

The Telnet remote Logon Service consists of the following four processes:

1) establish a connection between the local host and the remote host. This process is actually a TCP connection. You must know the IP address or domain name of the remote host;

2) Transmit the username and password entered on the local Terminal and any commands or characters entered later to the remote host in NVTNet Virtual Terminal format. in this process, an IP datagram is actually sent from the local host to the remote host;

3) convert the NVT format data output by the remote host to a local accepted format and send it back to the local terminal, including the command echo and command execution result;

4) Finally, the local terminal unconnects the remote host. This process is used to cancel a TCP connection.

The above content only discusses the most basic things of remote login. The complexity and the hardships of programmers are hard to imagine. While you are comfortable using the Telnet service, have you thought of this!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.