function Description:Log in remotely.
Syntax:telnet[ -8acdeffklrx] [-b< host alias.html ' target= ' _blank ' > aliases;] [-e< out of character;] [-k< domain name;] [-l< user name;] [-n< record file;] [-s< service type;] [-x< certification form;] [Host name or IP address < communication port;]
Additional notes:Perform the Telnet command to open the terminal stage job and log in to the remote host.
Parameters:
-8 allows the use of 8-bit character data, including input and output.
-a attempts to automatically log in to the remote system.
-b< host aliases > Use aliases to specify the remote host name.
-C does not read the. telnetrc file in the user-specific directory.
-D start the debug mode.
-e< out character > set out character.
-e filters out the off character.
-F The effect of this parameter is the same as specifying the "-F" parameter.
-F with Kerberos V5 authentication, this parameter can be used to upload authentication data from the local host to the remote host.
-k< domain name > When using Kerberos authentication, this parameter allows the remote host to take the specified realm name rather than the domain name of the host.
-K does not automatically log in to the remote host.
-l< User name > Specifies the name of the user to log in to the remote host.
-L allows output of 8-bit character data.
-n< log Files > specify information about file records.
-R uses a user interface similar to the rlogin directive.
-s< Service Type > set the IP TOS information required for Telnet connection.
-X assumes that the host has the capability to support data encryption and uses it.
-x< Authentication Pattern > Close the specified authentication pattern.
Telnet is a remote connection protocol
Command "Telnet IP port" to connect the specified IP and port to the remote host
To run the telnet command without parameters, run the ' Open IP Port ' command after the command mode is counted
Run Help to see the command moderator, display can see the escape settings, "^" in the ^ represents the CTRL key
This means that after the host is connected, press Ctrl and] two keys to enter the Telnet client command mode.
[[Email protected] ~]# Telnet
telnet> Display
echo [^e]
Escape [^]]
Rlogin [OFF]
Tracefile "(Standard output)"
Flushoutput [^o]
interrupt [^c]
Quit [^]
EOF [^d]
erase [^?]
Kill [^u]
Lnext [^v]
Susp [^z]
Reprint [^r]
Worderase [^w]
Start [^q]
Stop [^s]
FORW1 [OFF]
FORW2 [OFF]
Ayt [^t]
Telnet> quit
Extended Data One: Introduction to Setting up Telnet method under Linux operating system
Settings for Telnet under Linux
The configuration steps for the Telnet service are as follows:
First, install the Telnet package (typically two)
1, telnet-client (or Telnet), this package is provided by the Telnet client program;
2, Telnet-server, this package provides a Telnet server-side program;
Before installing, check whether these packages are installed, as follows:
[[email protected] root] #rpm –q Telnet or [[email protected] root] #rpm –q telnet-client
[[email protected] root] #rpm –q telnet-server
If the package is not detected and needs to be installed, Red Hat Linux 9 has the Telnet package installed by default, typically as long as the Telnet-server package is installed.
1. Get the TELNET-SERVER-0.17-25.I386.RPM package in the installation disk 3 of Red Hat Linux 9.
2. Install the Package
[[email protected] root] #rpm –i telnet-server-0.17-25.i386.rpm
Second, start the Telnet service
1. Open service
Method One: Using NTSYSV, in the window that appears, add telnet to the front * plus, and then press OK.
Method Two: Edit/etc/xinetd.d/telnet
[Email protected] root]# vi/etc/xinetd.d/telnet
Find Disable = Yes to change Yes to No.
2. Activation Service
[Email protected] root]# service xinetd restart
Third, testing services
[[email protected] root] #Telnet IP (or hostname)
If configured correctly, you are prompted to enter the user name and password for the remote machine
Login:
PassWord:
Note: Only normal users are allowed by default
Iv. Setting the Telnet port
#vi/etc/services
Find Telnet after entering edit mode (vi input/telnet under Edit)
Will find the following:
Telnet 23/tcp
Telnet 23/UDP
Change the 23 to an unused port number (for example: 2000), exit VI, restart the Telnet service, and the Telnet default port number is modified.
V. Telnet Service Limitations
Telnet transmits passwords and data in plaintext, and if you are dissatisfied with its default settings, it is necessary to limit its scope of service. Assuming that your host's IP is 210.45.160.17, you can set it as follows.
#vi/etc/xinetd.d/telnet
Service Telnet
{
Disable = no #激活 Telnet service, no
bind = 210.45.160.17 #your IP
Only_from = 210.45.0.0/16 #只允许 210.45.0.0 ~ 210.45.255.255 This network segment enters
Only_from =. edu.cn #只有教育网才能进入!
No_access = 210.45.160. #这两个ip不可登陆
Access_times = 8:00-12:00 20:00-23:59 # Every day only these two time periods open service
......
}
Vi. Login for Telnet root user
Telnet is not very secure and, by default, root is not allowed to telnet into the Linux host. To allow the root user to log in, the following methods are available:
[Root @echo/root]# Vi/etc/pam.d/login
#auth Required pam_securetty.so #将这一行加上注释!
Or
[Email protected] root]# Mv/etc/securetty/etc/securetty.bak
This allows root to go directly to the Linux host. However, it is not recommended to do so. You can also switch to the root user after the normal user has entered, with root privileges.
Note: There is no need to install Telnet server in my FC4 because there is already krb5-telnet. Go straight to the second step
Vi/etc/xinetd.d/krb5-telnet can do it.
Telnet Linux Parameters