Difference between revisions of "Telnet"

From Linuxintro
imported>ThorstenStaerk
Line 9: Line 9:
  
 
Here is for example how you query the http port to test if it is working:
 
Here is for example how you query the http port to test if it is working:
<pre>
 
tweedleburg:~ # telnet localhost 80
 
Trying ::1...
 
Connected to localhost.
 
Escape character is '^]'.
 
GET /index.htm HTTP/1.1
 
Host: localhost
 
  
HTTP/1.1 200 OK
+
tweedleburg:~ # <abbr title="what you type">telnet localhost 80</abbr>
Date: Sun, 03 Jul 2011 18:14:34 GMT
+
Trying ::1...
Server: Apache/2.2.17 (Linux/SUSE)
+
Connected to localhost.
Last-Modified: Sun, 03 Jul 2011 18:13:44 GMT
+
Escape character is '^]'.
ETag: "576863-54-4a72e360d0600"
+
<abbr title="what you type">GET /index.htm HTTP/1.1
Accept-Ranges: bytes
+
Host: localhost
Content-Length: 84
+
</abbr>
Content-Type: text/html
+
HTTP/1.1 200 OK
 
+
Date: Sun, 03 Jul 2011 18:14:34 GMT
<html>
+
Server: Apache/2.2.17 (Linux/SUSE)
<head>
+
Last-Modified: Sun, 03 Jul 2011 18:13:44 GMT
<title>
+
ETag: "576863-54-4a72e360d0600"
Test page
+
Accept-Ranges: bytes
</title>
+
Content-Length: 84
</head>
+
Content-Type: text/html  
<body>
+
hello world
+
<html>
</body>
+
<head>
</html>
+
<title>
</pre>
+
Test page
 +
</title>
 +
</head>
 +
<body>
 +
hello world
 +
</body>
 +
</html>
  
 
= See also =
 
= See also =

Revision as of 08:27, 6 April 2015

Telnet allows you to submit commands over the network in plain text. It was used to execute shell commands on remote computers, but this usecase has been superceded by ssh which protects passwords by encrypting the communication.

For controlling a computer via the network use ssh, not telnet!!!

Telnet is still good for

Here is for example how you query the http port to test if it is working:

tweedleburg:~ # telnet localhost 80
Trying ::1...
Connected to localhost.
Escape character is '^]'.
GET /index.htm HTTP/1.1
Host: localhost

HTTP/1.1 200 OK
Date: Sun, 03 Jul 2011 18:14:34 GMT
Server: Apache/2.2.17 (Linux/SUSE)
Last-Modified: Sun, 03 Jul 2011 18:13:44 GMT
ETag: "576863-54-4a72e360d0600"
Accept-Ranges: bytes
Content-Length: 84
Content-Type: text/html 

<html>
<head>
<title>
Test page
</title>
</head>
<body>
hello world
</body>
</html>

See also