Ubuntu – How to use telnet client in Ubuntu 18.04 terminal

command linetelnet

I read book about programming and networks.. Found this example:

enter image description here

As written in this book, after last <Enter> we must receive page raw HTML code..

I upload small script to my host to minimize amount of HTML code (script just print client IP) and try get this script in telnet interface:

$ telnet sflash.biz 80
Trying 109.206.168.84...
Connected to sflash.biz.
Escape character is '^]'.

I found in askubuntu answers '^]' is same Alt + Ctrl + ]. Push it and try type next line with GET request of my script URI, but telnet return this error ?Invalid command:

^[^]
telnet> GET /ip.php HTTP/1.1
?Invalid command
telnet>

Is something custom with Ubuntu telnet or I do something wrong?

Best Answer

try this:
$ telnet sflash.biz 80
Trying 109.206.168.84...
Connected to sflash.biz.
Escape character is '^]'
GET /ip.php HTTP/1.1
Host: sflash.biz

Related Question