Telnet service, although this service has been greatly reduced due to security issues. However, this is also an important basic protocol in network protocols. Therefore, this protocol is also the most basic protocol for us to learn remote login settings. Although its problems cannot be ignored, it also has many advantages. In layman's terms, Remote Login is another host on the network that the user registers with. It shares the resources and services provided by the host, just as it exists on the host, the user's terminal serves as the virtual terminal of the host. the usage of telnet in DOS and Windows systems is the same as that in UNIX systems.
Telnet initial
Telnet is easy to use. to log on to a remote host, you only need to enter $ telnethostname. The hostname is the remote host name. The other method is to enter the telnet status and enter $ telnet. Use the open command to establish a connection with the remote host, that is, telnet> open hostname. After you log on to the remote host, you can execute any commands provided by that host. The following is an example:
- king 16%telnetbeijing2.cernet.edu.cn
- Trying 166.111.250.2...
- Connected to beijing2.cernet.eduy.cn
- Escape character is '^]'
- SunOS UNIX (beijing2)
- Login incorrect
- login wangw
- Password:
- Last login:Wed Jan 11 11:18:56 from 166.111.25.41
- SunOS Release 4.1.3_U1(GENERIC)#1:Wed Oct 13 17:50:47 PDT 1993
- You have new mail
- beijing2%mail
- Mail version SMI 4.1-OWV3 Mon Sep 23 07:17:24 PDT 1991 Type ? for help.
- "/usr/spool/mail/wangw":2 messages 2 new
- >N1 guest@queen.cernet.edu.cn Wed Jan 11 11:19 16/611 say hello to you
- N2 pine391-Docserver@docserver.cac.washington.edu Wed Jan 11 11:21
- 442/23019 Pine info you requested
- & x
- beijing2%ls
- Luo-mail mailing-list-bbs www-talk
- cao-mail mailing-list-bbs1 zheng-mail
- beijing2%archie
- Usage:archie[-acelorstvLV][-m hits][-N level]string
- -a: list matches as Alex filenames
- -c: case sensitive substring search
- -e: exact string match(default)
- -r: regular expression search
- -s: case insensitive substring search
- -l: list one match per line
- -t: sort inverted by date
- -m hits: specifies maximum number of hits to return(default 98)
- -o filename: specifies file to store results in
- -h host: specifies server host
- -L: list known servers and current default
- -N level: specifies query niceness level(0-35765)
- beijing2%logout
- Connection closed by foreign host.
- king 17%
When you log on using the telnet service and host beijing2.cernet.edu.cn, you need to enter your account and password. some public servers on the Internet do not need accounts and passwords. on the Internet, some public servers can log on without an account or password. Therefore, many servers on the network can be accessed without an account. we will introduce it later.
Once you log on to beijing2, you can run UNIX commands, programs on the host, or telnet to connect to other hosts. therefore, if your computer is not connected to the Internet but is connected to a telephone line through Modem, you only need to connect to a local host to access a computer far away from the other end of the earth, then access the remote host through the telnet service.
You need to emphasize the terminal type. When you log on to a remote host, the remote host sometimes prompts you to enter the terminal type. You can use the following command line to enter the terminal type:
- $ setenv TERM term
- $ stty row x
- $ stty row y
Here, term is your terminal type. If the terminal type is VT100, you do not need to enter the character lines and columns displayed on the x and y screens. if you have an account on this host, as a common service, this host does not prompt you to enter the terminal type.