public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* openssh and inetd woes...
@ 2000-06-12 17:43 Stefan Norberg
  2000-06-13 12:24 ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Norberg @ 2000-06-12 17:43 UTC (permalink / raw)
  To: cygwin

Hi all! I'm new to this list so please bear with me if this is a clueless
question.

I'm trying to set up a *minimal* remote admin kit for NT using Corianna
Vinschen's excellent ports of inetd and openssh. This means I'm not using
the full Cygwin environment.

* When I'm running SSHD as a stand-alone server I can't scp to the system -
"connecion lost". SCP works fine if I'm running from inetd or if I'm running
"sshd -d".

* When running sshd from inetd I don't get the output from _Win32_ console
apps (like net.exe). These apps are started in the backgroud (a separate
console window pops up on the server). For some reason, this works fine when
running sshd as a stand-alone server or in debug mode.

Any clues - anyone?


Stefan Norberg
stnor@sweden.hp.com

Everything is mounted TEXT mode.

Files on the system:
--------------------
\winnt\system32:
	cygwin.dll (latest net release),
	inetd.exe (running as Local System),
	bash.exe,
	ssh*.exe

\etc:
	passwd (made by mkpasswd -l)
	group (made by mkgroup -l)
	inetd.conf
	ssh*

The software is built this way:

Inetutils
---------
$
./configure --libexecdir=/winnt/system32 --sysconfdir=/etc --prefix=/winnt/s
ystem32 --bindir=/winnt/system32 --sbindir=/winnt/system32
$ make all

OPENSSH
-------
bash-2.04$
./configure --prefix=/winnt/system32 --bindir=/winnt/system32 --sbindir=/win
nt/system32 --sysconfdir=/etc --with-ssl-dir=/usr/src/openssl/openssl-0.9.5 
--with-pid-dir=/winnt/system32 --with-default-path=/winnt/system32 --without
-lastlog --with-libexecdir=/winnt/system32


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: openssh and inetd woes...
  2000-06-12 17:43 openssh and inetd woes Stefan Norberg
@ 2000-06-13 12:24 ` Corinna Vinschen
  2000-06-13 14:22   ` openssh and inetd woes... + TCP wrappers-7.6-cygwin.diff Stefan Norberg
  2000-06-13 15:54   ` openssh and inetd woes Robert Collins
  0 siblings, 2 replies; 6+ messages in thread
From: Corinna Vinschen @ 2000-06-13 12:24 UTC (permalink / raw)
  To: Stefan Norberg; +Cc: cygwin

Stefan Norberg wrote:
> I'm trying to set up a *minimal* remote admin kit for NT using Corianna
> Vinschen's excellent ports of inetd and openssh. This means I'm not using
> the full Cygwin environment.
> 
> * When I'm running SSHD as a stand-alone server I can't scp to the system -
> "connecion lost". SCP works fine if I'm running from inetd or if I'm running
> "sshd -d".

Sorry but I can't reproduce that behaviour. I'm using sshd
as stand-alone service which runs with my own user account.

Are you trying to use password auth or RSA auth? I'm just
asking since RSA is not able to change the user context.

> * When running sshd from inetd I don't get the output from _Win32_ console
> apps (like net.exe). These apps are started in the backgroud (a separate
> console window pops up on the server). For some reason, this works fine when
> running sshd as a stand-alone server or in debug mode.

That behaviour seems to be related to inetd's state as a
windows service. I'm not sure but it's the only difference
which may result in that.

Corinna

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: openssh and inetd woes... + TCP wrappers-7.6-cygwin.diff
  2000-06-13 12:24 ` Corinna Vinschen
@ 2000-06-13 14:22   ` Stefan Norberg
  2000-06-13 15:54   ` openssh and inetd woes Robert Collins
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Norberg @ 2000-06-13 14:22 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

[snip]
>
> Are you trying to use password auth or RSA auth? I'm just
> asking since RSA is not able to change the user context.
>
I'm using password auth. I compiled everything on Win2k and I'm testing on
NT 4 SP6a.

I'll try to recompile on NT4 tonight and see if it makes any difference.

Also, if anyone is interested: I made a small patch to get tcp wrappers to
compile. The patch is attached to this message. It works great from inetd.
For some reason I couldn't get openssh to work '--with-tcp-wrappers' it
configures ok but it doesn't seem to be working. I built ssh-1.2.27 with
libwrap.a and that worked fine. If someone could take a quick look at the
patch and verify that I didn't screw up.

Stefan

[-- Attachment #2: tcp_wrappers_7.6-cygwin.diff --]
[-- Type: text/x-diff, Size: 1715 bytes --]

diff -ur tcp_wrappers_7.6-orig/Makefile tcp_wrappers_7.6/Makefile
--- tcp_wrappers_7.6-orig/Makefile	Fri Mar 21 19:27:21 1997
+++ tcp_wrappers_7.6/Makefile	Tue Jan 25 12:41:05 2000
@@ -352,6 +352,9 @@
 	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
 	LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv \
 	NETGROUP=-DNETGROUP AUX_OBJ="setenv.o strcasecmp.o" TLI=-DTLI all
+cygwin:
+	@make REAL_DAEMON_DIR=/winnt/system32 STYLE=$(STYLE) \
+	LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= all
 
 # MachTen
 machten:
diff -ur tcp_wrappers_7.6-orig/fix_options.c tcp_wrappers_7.6/fix_options.c
--- tcp_wrappers_7.6-orig/fix_options.c	Tue Apr 08 02:29:19 1997
+++ tcp_wrappers_7.6/fix_options.c	Sun Jan 23 23:06:00 2000
@@ -12,7 +12,9 @@
 #include <sys/types.h>
 #include <sys/param.h>
 #include <netinet/in.h>
+#ifndef __CYGWIN32__
 #include <netinet/in_systm.h>
+#endif
 #include <netinet/ip.h>
 #include <netdb.h>
 #include <stdio.h>
diff -ur tcp_wrappers_7.6-orig/percent_m.c tcp_wrappers_7.6/percent_m.c
--- tcp_wrappers_7.6-orig/percent_m.c	Wed Dec 28 17:42:37 1994
+++ tcp_wrappers_7.6/percent_m.c	Tue Jan 25 19:59:27 2000
@@ -12,11 +12,13 @@
 #include <errno.h>
 #include <string.h>
 
+#ifndef __CYGWIN32__
 extern int errno;
 #ifndef SYS_ERRLIST_DEFINED
 extern char *sys_errlist[];
 extern int sys_nerr;
 #endif
+#endif /* cygwin */
 
 #include "mystdarg.h"
 
@@ -29,11 +31,15 @@
 
     while (*bp = *cp)
 	if (*cp == '%' && cp[1] == 'm') {
+#ifndef __CYGWIN32__
 	    if (errno < sys_nerr && errno > 0) {
 		strcpy(bp, sys_errlist[errno]);
 	    } else {
+#endif
 		sprintf(bp, "Unknown error %d", errno);
+#ifndef __CYGWIN32__
 	    }
+#endif
 	    bp += strlen(bp);
 	    cp += 2;
 	} else {


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: openssh and inetd woes...
  2000-06-13 12:24 ` Corinna Vinschen
  2000-06-13 14:22   ` openssh and inetd woes... + TCP wrappers-7.6-cygwin.diff Stefan Norberg
@ 2000-06-13 15:54   ` Robert Collins
  2000-06-13 17:14     ` Stefan Norberg
  1 sibling, 1 reply; 6+ messages in thread
From: Robert Collins @ 2000-06-13 15:54 UTC (permalink / raw)
  To: cygwin

Just a stab in the dark... do you have inetd running as local system, with
'interact with desktop' turned on?

If so try turning that off

Rob
----- Original Message -----
From: "Corinna Vinschen" <corinna@vinschen.de>
To: "Stefan Norberg" <stnor@sweden.hp.com>
Cc: <cygwin@sourceware.cygnus.com>
Sent: Wednesday, June 14, 2000 5:23 AM
Subject: Re: openssh and inetd woes...


> Stefan Norberg wrote:
> > I'm trying to set up a *minimal* remote admin kit for NT using Corianna
> > Vinschen's excellent ports of inetd and openssh. This means I'm not
using
> > the full Cygwin environment.
> >
> > * When I'm running SSHD as a stand-alone server I can't scp to the
system -
> > "connecion lost". SCP works fine if I'm running from inetd or if I'm
running
> > "sshd -d".
>
> Sorry but I can't reproduce that behaviour. I'm using sshd
> as stand-alone service which runs with my own user account.
>
> Are you trying to use password auth or RSA auth? I'm just
> asking since RSA is not able to change the user context.
>
> > * When running sshd from inetd I don't get the output from _Win32_
console
> > apps (like net.exe). These apps are started in the backgroud (a separate
> > console window pops up on the server). For some reason, this works fine
when
> > running sshd as a stand-alone server or in debug mode.
>
> That behaviour seems to be related to inetd's state as a
> windows service. I'm not sure but it's the only difference
> which may result in that.
>
> Corinna
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
>
>


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: openssh and inetd woes...
  2000-06-13 15:54   ` openssh and inetd woes Robert Collins
@ 2000-06-13 17:14     ` Stefan Norberg
  2000-06-14  3:02       ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Norberg @ 2000-06-13 17:14 UTC (permalink / raw)
  To: cygwin

> > I'm trying to set up a *minimal* remote admin kit for NT
> > using Corinna Vinschen's excellent ports of inetd and openssh. This
means I'm not
> > using the full Cygwin environment.
> >
> > * When I'm running SSHD as a stand-alone server I can't scp to the
system -
> > "connecion lost". SCP works fine if I'm running from inetd or if I'm
running "sshd -d".
>
> Sorry but I can't reproduce that behaviour. I'm using sshd
> as stand-alone service which runs with my own user account.

I nailed it down to bash. It works if I use "sh" as the shell. Why?
Corinna - are you researching the inetd Win32 stuff or is it in /dev/null?

The next step is to get openssh built with TCP Wrappers support...


Stefan


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: openssh and inetd woes...
  2000-06-13 17:14     ` Stefan Norberg
@ 2000-06-14  3:02       ` Corinna Vinschen
  0 siblings, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2000-06-14  3:02 UTC (permalink / raw)
  To: Stefan Norberg; +Cc: cygwin

Stefan Norberg wrote:
> > Sorry but I can't reproduce that behaviour. I'm using sshd
> > as stand-alone service which runs with my own user account.
> 
> I nailed it down to bash. It works if I use "sh" as the shell. Why?

Because the path "/bin/sh" is hardcoded as the path to the default
shell, if ssh can't find another shell in the users /etc/passwd
entry. If you don't like it, you'll have to config _PATH_BSHELL
as another shell and moreover there are some hardcoded /bin/sh
calls in some sourcefiles which has to be changed by hand:

	session.c
	sshconnect.c

I've just mailed that problem to one of the OpenSSH maintainers.

> Corinna - are you researching the inetd Win32 stuff or is it in /dev/null?

I'm sorry again, I can't reproduce that on my system. I have
started sshd via inetd and the output of native win32 tools
is shown in my ssh xterm window as well as in ssh started from a
cmd window as expected. But I have seen a problem with xauth in
that configuration which I will (hopefully) get patched in my
next version of OpenSSH. Seems to be a permission problem.

Corinna

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-06-14  3:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-12 17:43 openssh and inetd woes Stefan Norberg
2000-06-13 12:24 ` Corinna Vinschen
2000-06-13 14:22   ` openssh and inetd woes... + TCP wrappers-7.6-cygwin.diff Stefan Norberg
2000-06-13 15:54   ` openssh and inetd woes Robert Collins
2000-06-13 17:14     ` Stefan Norberg
2000-06-14  3:02       ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).