當在telnet中輸入文字時,預設情況下它在Linemode中運行,每行發送數據封包,因此只需按Enter將命令發送到遠端主機。
To test Telnet in Linemode, you can run the dummy server to be listening on the local port, e.g. by using netcat
(install if needed):
nc -vl localhost 1234
then in another terminal connect to your server by:
telnet localhost 1234
and start entering some text to check when the data is received.
Hit Control–] (^]
) and type quit
to finish.
It is also possible to send data using Bash shell by the following command:
cat > /dev/tcp/127.0.0.1/1234
then start entering text. When finished, hit Control–D.