Discussion:
Outbound telnet/ftp from cygwin not working
Michael Rilling
2005-08-05 15:25:12 UTC
Permalink
I've googled and can't find answers to my issue. Several people have
mentioned the same issue, but no replies. Hope you can help.

I've installed the latest cygwin base on my XP SP2 machine.
I've also installed inetutils along with the X stuff.

I'm trying to do a simple telnet from within cygwin.
I run the cygwin.bat file and type telnet (external-host) and always get
telnet: tcp/telnet: unknown service

Yet when I run the windows telnet client to the same/any host, it works fine.

I have similar issues with FTP.

I'm wondering if you can help me, or point me to a web site with
helpful descriptions.

regards,
mike
Dave Korn
2005-08-05 16:00:33 UTC
Permalink
----Original Message----
From: Michael Rilling
Sent: 05 August 2005 16:25
I've googled and can't find answers to my issue. Several people have
mentioned the same issue, but no replies. Hope you can help.
I've installed the latest cygwin base on my XP SP2 machine.
I've also installed inetutils along with the X stuff.
I'm trying to do a simple telnet from within cygwin.
I run the cygwin.bat file and type telnet (external-host) and always get
telnet: tcp/telnet: unknown service
Yet when I run the windows telnet client to the same/any host, it works fine.
I have similar issues with FTP.
I'm wondering if you can help me, or point me to a web site with
helpful descriptions.
This error message is often caused when $SYSTEMROOT is not set (or not set
correctly) in your cygwin environment. What does "set | grep SYST" show you
at the bash prompt?

If that isn't it, let's see your http://cygwin.com/problems.html cygcheck
output.

cheers,
DaveK
--
Can't think of a witty .sigline today....
Brian Dessent
2005-08-05 18:31:23 UTC
Permalink
Post by Michael Rilling
telnet: tcp/telnet: unknown service
In addition to what Dave said, ensure that you have a symlink from
/etc/services to %WINDIR%\system32\drivers\etc\services and that there
is a line containing the telnet service in that file. This link should
have been created upon installation for you, and the default windows
services file should have telnet listed, so normally this is not
something you ever have to worry about.

Brian
Michael Rilling
2005-08-05 18:37:08 UTC
Permalink
Wow,
After doing a lot more googleing, I've stumbled upon this fix. Wonder
if you know about this issue?

In regedit go to HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
edit DataBasePath change %SystemRoot% to its real value (on mine its
C:\WINDOWS) Don't know why but this fixed my issue.

Let me know if you've heard this before.

regards,
mike

---------- Forwarded message ----------
From: Michael Rilling <***@gmail.com>
Date: Aug 5, 2005 11:25 AM
Subject: Outbound telnet/ftp from cygwin not working
To: ***@cygwin.com


I've googled and can't find answers to my issue. Several people have
mentioned the same issue, but no replies. Hope you can help.

I've installed the latest cygwin base on my XP SP2 machine.
I've also installed inetutils along with the X stuff.

I'm trying to do a simple telnet from within cygwin.
I run the cygwin.bat file and type telnet (external-host) and always get
telnet: tcp/telnet: unknown service

Yet when I run the windows telnet client to the same/any host, it works fine.

I have similar issues with FTP.

I'm wondering if you can help me, or point me to a web site with
helpful descriptions.

regards,
mike
Brian Dessent
2005-08-05 18:49:47 UTC
Permalink
Post by Michael Rilling
After doing a lot more googleing, I've stumbled upon this fix. Wonder
if you know about this issue?
In regedit go to HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
edit DataBasePath change %SystemRoot% to its real value (on mine its
C:\WINDOWS) Don't know why but this fixed my issue.
Let me know if you've heard this before.
This happens when something edits the registry and changes that key
from REG_EXPAND_SZ to REG_SZ. %-variables are only expanded in keys of
type REG_EXPAND_SZ. You should find that by default Windows uses
%SystemRoot% and REG_EXPAND_SZ so everything works fine. It's only when
some brain-dead program or installer mucks about with that key and
changes it to a regular string that you have a problem.

And this will only matter to programs that call getservbyname(), which
these days are very far and few between. telnet is one though.

Brian
Brian Dessent
2005-08-05 19:05:44 UTC
Permalink
This happens when ...
.. or alternatively, your $SYSTEMROOT variable wasn't set at all, as
Dave said. Hard-coding it will fix the problem, but you really should
find out why it's not set if that is the case, because it could lead to
future mysterious problems.

Past versions of the Cygwin DLL had minor bugs where it would not
propagate the SYSTEMROOT variable in certain circumstances, such as when
sshing into a machine. But that should be fixed with any recent
version.

Brian

Loading...