Reputation: 22114
I'm new to linux socket programming,after connected to the remote server
telnet x.x.x.x xxxx
How can I send a EOF character to the remote server through telnet?
these character escape doesn't seem to work
^D
^]D
`^]D`
and how to terminate this telnet connection
Upvotes: 2
Views: 9542
Reputation: 994
In typical *ix telnet, you should be able to hold control and press ] (right square bracket) to get to the telnet prompt. From there, you can type 'quit' to exit telnet entirely.
The client should be telling you this when it first starts up. For instance, on my box:
~$ telnet localhost 2050
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
That last line is the pertinent one. Its using a caret ^ to represent 'hold control'. :)
It is possibly worthwhile to type 'help' to see what your other options are when you're at the telnet prompt.
Upvotes: 6