Linux Telnet command parameters and usage details-Telnet to connect to a remote terminal command

Source: Internet
Author: User

From: http://www.linuxso.com/command/telnet.html

Function Description:Remote login.

Syntax:TeLnEt[-8aCDEffklrx] [-B Alias. Html 'target = '_ blank'>Alias>] [-E <Escape Character>] [-k <Domain Name>] [-L <User Name>] [-n <Record File>] [-S <service type>] [-x <authentication form>] [host name or IP address <communication port>]

Note:RunTelnetCommand to start a terminal job and log on to the remote host.

Parameters:
-8: 8 characters are allowed, including input and output.
-A tries to automatically log on to the remote system.
-B -C does not read. telne from the user's exclusive directory. Tr C file.
-D start the troubleshooting mode.
-E <Escape Character> sets the escape character.
-E: filter out the escape characters.
-F: the effect of this parameter is the same as that of the specified "-F" parameter.
-F when Kerberos v5 is used for authentication, you can add this parameter to upload the authentication data of the local host to the remote host.
-K <Domain Name> adds this parameter when Kerberos authentication is used, so that the remote host uses the specified domain name instead of the domain name of the host.
-K does not automatically log on to the remote host.
-L <User Name> specifies the name of the user to log on to the remote host.
-L 8 characters can be output.
-N <Record File> specifies the file record information.
-R uses a user interface similar to the rlogin command.
-S <service type> sets the IP address TOS required for the telnet connection.
-X: if the host supports data encryption, use it.
-X <authentication form> disables the specified authentication form.

Telnet is a remote connection protocol.
Command"Telnet IP port" to connect to the remote host of the specified IP address and port
If you want to directly run the Telnet command without parameters, enter the command mode, and then run the 'open IP port "command
Run help to view the command Moderator, and display to view the escape settings. The ^ in "^]" indicates the ctrl key.
After the host is connected, press Ctrl and] to enter the command mode of the Telnet client.

[Root @ ~] # Telnet
Telnet> display
Echo [^ e]
Escape [^]
Rlogin [off]
Trace File "(Standard output )"
Flushoutput [^ o]
Interrupt [^ C]
Quit [^]
EOF [^ d]
Erase [^?]
Kill [^ U]
Ln Ex T [^ V]
Su SP [^ Z]
Reprint [^ r]
Worderase [^ w]
Start [^ q]
Stop [^ s]
Forw1 [off]
Forw2 [off]
Ayt [^ t]
Telnet> quit

Document 1: How to set up Telnet in Linux

Telnet settings in Linux

To configure the telnet service, follow these steps:

1. Install the Telnet package (usually two)

1. telnet-client (or telnet). This package provides the Telnet client.Program;

2. telnet-server. This package provides telnet server programs;

Check whether these software packages are installed before installation. The method is as follows:

[Root@linuxso.com root] # rpm-Q telnet or [root @ wljs root] # rpm-Q telnet-Client

[Root@linuxso.com root] # rpm-Q telnet-Server

If no software package is detected, install it. By default, the Telnet software package is installed in Red Hat Linux 9. Generally, you only need to install the telnet-server software package.

1. Get the Telnet-server-0.17-25.i386.rpm package from installation disk 3 of Red Hat Linux 9.

2. install the software package

[Root@linuxso.com root] # rpm-I Telnet-server-0.17-25.i386.rpm

Ii. Start the Telnet Service

1. Start the service

Method 1: UseNtsysvIn the displayed window, add * Before telnet, and then press OK.

Method 2: edit/etc/xinetd. d/telnet

[Root@linuxso.com root] # vi/etc/xinetd. d/telnet

Find disable = yes and change Yes to No.

2. Activate the service

[Root@linuxso.com root] # service xinetd restart

Iii. Test services

[Root@linuxso.com root] # telnet IP (or hostname)

If the configuration is correct, the system prompts you to enter the user name and password of the remote machine.

Login:

Password:

Note: Only common users are allowed by default.

4. Set the telnet port

# Vi/etc/services

Go to edit mode and find telnet (input/telnet in VI editing mode)

The following content is found:

Telnet 23/TCP

Telnet 23/udp

Modify 23 to an unused port number (for example, 2000), exit VI, restart the telnet service, and modify the default port number for telnet.

V. Telnet service restrictions

Telnet is a plaintext transmission password and data. If you are not satisfied with the default settings, You need to restrict the service scope. If the IP address of your host is 210.45.160.17, you can set it as follows.

# Vi/etc/xinetd. d/telnet
Service telnet

{
Disable = No # activate the telnet service, no
Bind = 210.45.160.17 # Your IP
Only_from = 210.45.0.0/16 # Only 210.45.0.0 ~ is allowed ~ 210.45.255.255
Only_from =. eDu. Cn # Only CERNET can access!
No_access = 210.45.160. # these two IP addresses cannot be logged on.
Access _TimeS =--# The service is only available for these two periods each day.
......
}

Vi. login from telnet Root User

Telnet is not safe. By default, the root user is not allowed to use Telnet to access the Linux host. To allow the root user to log on, use the following methods:

[Root @ echo/root] # vi/etc/PAM. d/login

# Auth required pam_securetty.so # Add comments to this line!

Or

[Root@linuxso.com root] #MV/Etc/securetty. Bak

In this way, the root user can directly access the Linux host. However, we recommend that you do not do this. You can also switch to the root user after a common user enters, with the root permission.

Note: Do not install the telnet server in my FC4, because there is already a krb5-Telnet. Go directly to step 2

VI/etc/xinetd. d/krb5-Telnet.

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.