Ralph Shumaker wrote:
> James G. Sack (jim) wrote:
>> Ralph Shumaker wrote:
>>  
>>> Paul G. Allen wrote:
>>>    
>>>> Use telnet from the command line to see if anything is listening on
>>>> the suspected ports.
>>>>       
>>> $ telnet localhost 0
>>> Trying 127.0.0.1...
>>> telnet: connect to address 127.0.0.1: Connection refused
>>> .
>>> .
>>> .
>>> $ telnet localhost 24
>>> Trying 127.0.0.1...
>>> telnet: connect to address 127.0.0.1: Connection refused
>>> $ telnet localhost 25
>>> Trying 127.0.0.1...
>>> Connected to localhost.
>>> Escape character is '^]'.
>>> 220 myComputerIPv4.dslextreme.com ESMTP Sendmail 8.14.1/8.14.1; Thu, 21
>>> Feb 2008 18:34:08 -0800
>>>
>>> Do I need sendmail?  Is that something that is necessary for
>>> Thunderbird?  Or is this something that allows me to operate an email
>>> server?
>>>
>>> By the way, how do I break the connection between telnet and port 25?
>>> My command prompt hasn't returned.  ^C, ^D, ^Z don't work.  I could just
>>> close the VT, but I don't want a telnet zombie.
>>>
>>>     
>>
>> The way I say it is:
>> The meaning of
>>   Escape character is '^]'.
>> is that you can "escape" from communication with the remote terminal.
>> So type the Ctrl-], which gives you a "telnet>" command prompt. Then try
>> help, and note the quit command.
>>
>> Regards,
>> ..jim
>>   
> 
> Tres kewl!  (BTW, you must hit Enter after Ctrl-].)

Yup, I forgot. BTW, such "escapes" are sometimes only recognized as the
first character in a prompted input (first char after a newline). I know
that ssh works that way. The escape character in ssh is '~' but it gives
no prompt. You do get help with '~?' though.

> 
> Now, any idea why this:
> $ telnet localhost 111
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> Connection closed by foreign host.
> 
> This one seemed to time out after a while (how much time, I have no
> idea).  But why would it say that it was closed by a "foreign host"? 
> And what uses port 111?

The "closed by foreign host" means the service you connected to (111 is
rpc) decided to abort. That usually happens because of unexpected input,
although timeout would also be understandable. You violated it's
protocol. Shame! ;-)

You can often find the answer to your question about port numbers via
  grep 111 /etc/services
(actually grep '\<111\/' /etc/services works better)

rpc = portmapper = sunrpc = ...
You might try man on any/all of these names.
And man services, too.

Regards,
..jim


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to