delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/04/05/19:40:54

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=4.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,SPF_HELO_PASS,TO_NO_BRKTS_MSFT,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: "John" <jw72253 AT verizon DOT net>
Subject: Re: telnet to newsgroup
Date: Thu, 5 Apr 2012 18:40:03 -0500
Lines: 69
Message-ID: <jllah2$356$1@dough.gmane.org>
References: <jlkju4$n27$1 AT dough DOT gmane DOT org> <jlklph$5tk$1 AT dough DOT gmane DOT org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

"Andrew DeFaria" <Andrew AT DeFaria DOT com> wrote in message 
news:jlklph$5tk$1 AT dough DOT gmane DOT org...
> On 4/5/2012 10:14 AM, John wrote:
>> Hello. I read on another list about how one (presumably) Linux user 
>> connects
>> to newsgroups using one of two different methods on the command line. If 
>> I
>> am not mistaken, both use telnet.  The two different commands he used to
>> illustrate them are these:
>>
>> You can use STARTTLS on the nntp port (119):
>>
>>    $ echo -e 'HELP\nQUIT\n' | nc news.gmane.org nntp | grep TLS
>>      STARTTLS
>>    $
>>
>> or you can connect to the nntps port (563):
>>
>>    $ gnutls-cli --insecure -p nntps news.gmane.org | grep 200
>>    200 news.gmane.org InterNetNews NNRP server INN 2.5.1 ready (posting 
>> ok)
>>    QUIT
>>    $
>>
>>
>> The second of these is using a program called "gnutls-cli", which is that 
>> is
>> available to cygwin. I have cygwin on my system and I tied using the 
>> command
>> at the Windows command prompt exactly like this:
>>
>> gnutls-cli --insecure -p nntps news.gmane.org | grep 200
>>
>> It did not work but I got an error back:
>>
>>   "Cannot resolve news.gmane.org:nntps: servname not supported
>> for the ai_socktype."
>>
>> What am I missing in order to make this work?  Thanks.
>
> Cygwin creates a symlink for /etc/services -> 
> /cygdrive/c/WINDOWS/system32/drivers/etc/services. I don't find an entry 
> for nttps in /etc/services, really WINDOWS\system32\drivers\etc\services. 
> I do find it on Linux:
>
>    Linux:grep nttps /etc/services
>    nntps           563/tcp                         # NNTP over SSL
>
>    Cygwin:grep nttps /etc/services
>    Cygwin:
>
> You could try adding the line to /etc/services or somehow specifying port 
> 563 to gnutls-cli.

Okay, I substituted 563 for nntps in the command like this:

gnutls-cli --insecure -p 563 news.gmane.org | grep 200

And it now works correctly. Exactly the same response from his linux system 
was returned in my cygwin environment:

200 news.gmane.org InterNetNews NNRP server INN 2.5.1 ready (posting ok)

Am I understanding that this is an encrypted Telnet connection to gmane's 
news server? Is the reason for the option "--insecure" needed because this 
is not an authenticated logon? Thanks.




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019