• Aucun résultat trouvé

The TELNET Utility

Dans le document DEC TCP/IP Services for VMS (Page 24-28)

This chapter provides the following information about using TELNET:

• Accessing TELNET

• Using TELNET commands

• Switching between input and command mode

• Terminating a session

Chapter 10 provides a summary of TELNET commands and a reference section on these commands.

3.1 How TELNET Works

The TELNET utility allows you to access any system on your network that is running the TELNET server software. When you use TELNET, you establish a virtual terminal session between your terminal and a remote host. That is, your terminal responds as if you were directly connected to the remote host.

If the remote system to which you are connected supports virtual terminals and your session is disconnected for any reason, you can resume the same session when you reconnect to the same host. The system manager of the remote system to which you plan to connect can tell you if that system supports virtual terminals.

3.2 Accessing TELNET

To use TELNET, you must know what hosts are available on your network. You must also have a user account on each remote host you want to access.

The TELNET command has the following syntax:

TELNET [hostname] [port]

The hostname parameter specifies the remote host to which you want to connect.

You can use the name, Internet address, or alias of the remote host with this parameter. The port parameter specifies a particular communications port on the remote host. In most cases, you need to specify only the port parameter if you are connecting to a TELNET server that uses a nonstandard communications port.

There are two ways to start a TELNET session: command mode and input mode.

• Input mode-Connects immediately to the remote host.

• Command mode-Allows you to set up parameters and options on the local host before connecting to the remote host.

You can switch back and forth between command mode and input mode at any time.

The TELNET Utility 3-1

3.2.1 Using TELNET in Input Mode

To start a TELNET session in input mode, specify a remote host with the TELNET command. For example:

$

TELNET logs you in to the remote host ARIEL and requests your user name and password on the remote system:

Trying ...

Mter you log in to the remote host, you can issue commands to the remote host as if you were connected directly to it. The remote host will give you its own prompt (in this case, ARIEL». When you enter commands at the remote host prompt, you are in input mode.

3.2.2 Using TELNET in Command Mode

To use TELNET commands on your local system, you must first be in command mode. TELNET commands let you define the parameters and options for your TELNET session and show session status. When you are in command mode, the commands you enter are interpreted by your local host and passed to the remote host.

To start a TELNET session in command mode, enter the TELNET command at the system prompt. When you enter command mode, the TELNET prompt appears:

$ TELNET>

To establish a connection with a remote host from command mode, type either connect or open, and then log in to the remote host. When you establish a connection with the remote host, you automatically enter input mode. In the following example, TELNET attempts to log you in to remote host ARIEL and requests your user name and password on the remote· system:

TELNET>

The Applications TELNET client supports two command interfaces as follows:

• DCL interface

• Standard TELNET command interface

Chapter 10 documents the DCL commands and provides the equivalent standard TELNET command for each DCL command. For more information on the standard TELNET commands, refer to your UNIX documentation.

3-2 The TELN ET Utility

3.2.3 Switching Between Input Mode and Command Mode

To switch from input mode to command mode, use an escape sequence. The default escape sequence is ICtrl/]I. (If you want to change the escape sequence, use the SET ESCAPE command. See Chapter 10 for more information.)

When you enter the escape sequence, the characters you enter are not echoed to the screen, just as if you had entered your password. To return to input mode, press

I

Return

I

after the TELNET command you entered has been invoked. For example:

ARIEL>

TELNET>

Connected to remote

Operating in character-at-a-time mode.

Escape character is fA] f ARIEL>

If you started your TELNET session in command mode, you enter input mode when you establish a connection with a remote host.

3.3 Using TELNET Initialization Command Files

You use a TELNET initialization command file to customize your user environment. The initialization file must reside in your login directory and be named TELNETINIT.INI.

To create an initialization file, create a file with one TELNET command on each line. For example:

In this example, AUTOFLUSH is disabled, binary transmission is enabled, debug is enabled, the terminal type is set to VT100, and the escape sequence is set to

ICtrI/NI·

3.4 Terminating a TELNET Session

There are two ways to terminate a TELNET session:

• If you entered your TELNET session in input mode, log out of the remote host.

• If you entered the session in command mode, return to command mode and type EXIT or QUIT.

If you are connected to a VMS system, you should always log out of the process on the remote VMS host before you exit TELNET to ensure that the process is properly terminated. If you exit from TELNET while still connected to a remote VMS host, the process may still remain active.

The TELNET Utility 3-3

4

Dans le document DEC TCP/IP Services for VMS (Page 24-28)