Linux system management and maintenance - telnet command

  

Function description: communicate with remote host through telnet protocol or get the information of the corresponding port of remote host. Complete the same function as telnet under windows. Use format: telnet host name or ip address port example: 1. Log in to the remote host with the telnet service enabled via telnet. Use the following command: [root@localhost ~]# telnet 192.168.60.123 23Trying 192.168.60.123...Connected to 192.168.60.123 (192.168.60.123).Escape character is '^]'.HP-UX host4 B.11.11 U 9000/800 (ta)login: rootPassword:#When we enter the username and password, we log in to the server 192.168.60.123“, here we use ”telnet 192.168.60.123“ is also possible, because telnet defaults to looking for ”23“ port. [root@localhost ~]# telnet 192.168.60.123 25Trying 192.168.60.123...telnet: connect to address 192.168.60.123: Connection refused# If this problem occurs, the service corresponding to this port is not enabled, or the port is blocked, no Access. 2. To see if the 22 and 80 ports of a Linux system are open and what services are enabled respectively, use the following command: [root@localhost ~]# telnet 192.168.60.88 22Trying 192.168.60.21...Connected to 192.168.60.21 (192.168.60.21 ).Escape character is '^]'.SSH-1.99-OpenSSH_3.9p1Protocol mismatch.Connection closed by foreign host.# It can be seen from this that the ssh service is running on port 22 of "192.168.60.88", corresponding to The ssh version is OpenSSH_3.9p1. [root@localhost ~]# telnet www.qianshoublog.com 80Trying 221.130.192.57...Connected to www.qianshoublog.com(221.130.192.57).Escape character is '^]'.get<!DOCTYPE HTML PUBLIC "- //IETF//DTD HTML 2.0//EN"><html><head><title>501 Method Not Implemented</title></head><body><h1>Method Not Implemented< ;/h1><p>get to /index.html not supported.<br /></p><hr><address>Apache/2.2.4 (Unix) PHP
/5.2.3 mod_fastcgi/2.4.2 Resin/3.1.3 Server at www.qianshoublog.com Port 80</address></body></html>Connection closed by foreign host.#When we type“ Telnet www.qianshoublog.com 80 & ldquo; After that, if & rdquo; www.ixdba.net & ldquo; corresponding ip port 80 is open, will give a welcome message, similar to & nbsp; Escape character is '^] '“, this time We use the keyboard input > get“ command to display the application server type corresponding to port 80. For example, the application service corresponding to port 80 of this example is a. The combination of pache and php and resin.

Copyright © Windows knowledge All Rights Reserved