This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

sshd logout immediately after successfully logged in



Hello folks,

I cann't log on my Windows 2000 Terminal Server which is
running sshd as a service by ssh client. It's logout 
immediately after successfully logged in. Howerver, I 
can log on without any change of all my system variables
and sshd configuration file if I run "/usr/sbin/sshd" in
a commmand prompt window. 

I'm quiet sure I've installed latest version of Cygwin and 
all the patches for Windows box. I use Microsoft Resource 
kit to set up a service for sshd.

Following are the configuration files and debug dump out:

terrence@TOADY ~
$ env
NUMBER_OF_PROCESSORS=2
PROMPT=$P$G
PWD=/home/terrence
LOGONSERVER=\\TOADY
OS2LIBPATH=C:\WINNT\system32\os2\dll;
COMSPEC=C:\WINNT\system32\cmd.exe
!C:=C:\cygwin\bin
SYSTEMDRIVE=C:
HOSTNAME=TOADY
PROCESSOR_REVISION=0502
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
COMPUTERNAME=TOADY
WINDIR=C:\WINNT
USERPROFILE=C:\Documents and Settings\terrence
PS1=\[\033]0;\w\007
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$
CYGWIN=tty
PROGRAMFILES=C:\Program Files
USERDNSDOMAIN=its.unimelb.edu.au
USER=terrence
MACHTYPE=i686-pc-cygwin
PROCESSOR_IDENTIFIER=x86 Family 6 Model 5 Stepping 2, GenuineIntel
OS=Windows_NT
OLDPWD=/usr/bin
CLIENTNAME=igloo
PROCESSOR_ARCHITECTURE=x86
TEMP=/cygdrive/c/DOCUME~1/terrence/LOCALS~1/Temp/1
PROCESSOR_LEVEL=6
SYSTEMROOT=C:\WINNT
HOMEDRIVE=C:
ALLUSERSPROFILE=C:\Documents and Settings\All Users
SHLVL=1
MAKE_MODE=unix
APPDATA=C:\Documents and Settings\terrence\Application Data
COMMONPROGRAMFILES=C:\Program Files\Common Files
HOMEPATH=\Documents and Settings\terrence
USERDOMAIN=ISD
USERNAME=terrence
SHELL=/bin/bash
HOSTTYPE=i686
SESSIONNAME=ICA-tcp#1
OSTYPE=cygwin
TERM=cygwin
HOME=/home/terrence
PATH=/usr/local/bin:/usr/bin:/bin:/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/
cygdrive/c/WINNT/System32/Wbem
_=/usr/bin/env

terrence@TOADY ~
$ cat /etc/sshd_config
# This is ssh server systemwide configuration file.

Port 22
#
Protocol 2,1
ListenAddress 0.0.0.0
#ListenAddress ::
#
# Uncomment the following lines according to the used authentication
HostKey /etc/ssh_host_key
HostKey /etc/ssh_host_rsa_key
HostKey /etc/ssh_host_dsa_key
ServerKeyBits 768
LoginGraceTime 600
KeyRegenerationInterval 3600
PermitRootLogin yes
#
# Don't read ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

#
# The following setting overrides permission checks on host key files
# and directories. For security reasons set this to "yes" when running
# NT/W2K, NTFS and CYGWIN=ntsec.
StrictModes yes

X11Forwarding no
X11DisplayOffset 10
PrintMotd yes
KeepAlive yes

# Logging
SyslogFacility AUTH
LogLevel INFO
#obsoletes QuietMode and FascistLogging

RhostsAuthentication no
#
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no

RSAAuthentication yes

PasswordAuthentication yes
PermitEmptyPasswords yes

CheckMail no
UseLogin no

#Uncomment if you want to enable sftp
Subsystem      sftp    /usr/sbin/sftp-server
MaxStartups 10:30:60

terrence@TOADY ~
$ cat /etc/passwd
terrence::1120:513:Terrence Miao,S-1-5-21-606747145-861567501-682003330-1120:/ho
me/terrence:/bin/bash


-------------------------------------
I try to log on from another machine:
-------------------------------------

[terrence@igloo terrence]$ ssh -v -v -v toady
OpenSSH_2.5.2p2, SSH protocols 1.5/2.0, OpenSSL 0x0090600f
debug1: Seeding random number generator
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: getuid 500 geteuid 0 anon 1
debug1: Connecting to toady [128.250.20.207] port 22.
debug1: Connection established.
debug1: identity file /home/terrence/.ssh/identity type 0
debug1: unknown identity file /home/terrence/.ssh/id_rsa
debug1: identity file /home/terrence/.ssh/id_rsa type -1
debug3: Bad RSA1 key file /home/terrence/.ssh/id_dsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: no key found
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug3: key_read: no space
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: no key found
debug1: identity file /home/terrence/.ssh/id_dsa type 2
debug1: Remote protocol version 1.99, remote software version OpenSSH_2.9p2
debug1: match: OpenSSH_2.9p2 pat ^OpenSSH
Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_2.5.2p2
debug1: send KEXINIT
debug1: done
debug1: wait KEXINIT
debug1: got kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug1: got kexinit: ssh-rsa,ssh-dss
debug1: got kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se
debug1: got kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se
debug1: got kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug1: got kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug1: got kexinit: none,zlib
debug1: got kexinit: none,zlib
debug1: got kexinit: 
debug1: got kexinit: 
debug1: first kex follow: 0 
debug1: reserved: 0 
debug1: done
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: Sending SSH2_MSG_KEX_DH_GEX_REQUEST.
debug1: Wait SSH2_MSG_KEX_DH_GEX_GROUP.
debug1: Got SSH2_MSG_KEX_DH_GEX_GROUP.
debug1: dh_gen_key: priv key bits set: 139/256
debug1: bits set: 1051/2049
debug1: Sending SSH2_MSG_KEX_DH_GEX_INIT.
debug1: Wait SSH2_MSG_KEX_DH_GEX_REPLY.
debug1: Got SSH2_MSG_KEXDH_REPLY.
debug3: key_read: type mismatch
debug3: key_read: type mismatch
debug1: Host 'toady' is known and matches the RSA host key.
debug1: Found key in /home/terrence/.ssh/known_hosts2:3
debug1: bits set: 1023/2049
debug1: ssh_rsa_verify: signature correct
debug1: Wait SSH2_MSG_NEWKEYS.
debug1: GOT SSH2_MSG_NEWKEYS.
debug1: send SSH2_MSG_NEWKEYS.
debug1: done: send SSH2_MSG_NEWKEYS.
debug1: done: KEX2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: service_accept: ssh-userauth
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,password,keyboard-interactive
debug3: authmethod_lookup publickey
debug3: remaining preferred: password,keyboard-interactive
debug3: authmethod_is_enabled publickey
debug1: next auth method to try is publickey
debug1: try privkey: /home/terrence/.ssh/id_rsa
debug3: no such identity: /home/terrence/.ssh/id_rsa
debug1: try pubkey: /home/terrence/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: authentications that can continue: publickey,password,keyboard-interactive
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: keyboard-interactive
debug3: authmethod_is_enabled password
debug1: next auth method to try is password
terrence@toady's password: ************
debug2: packet_inject_ignore: current 61
debug2: packet_inject_ignore: block 16 have 5 nb 4 mini 1 need 3
debug2: we sent a password packet, wait for reply
debug1: ssh-userauth2 successful: method password
debug1: channel 0: new [client-session]
debug1: send channel open 0
debug1: Entering interactive session.
debug2: callback start
debug1: client_init id 0 arg 0
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: channel request 0: shell
debug2: callback done
debug1: channel 0: open confirm rwindow 0 rmax 16384
debug2: channel 0: rcvd adjust 32768
Last login: Thu Aug 23 12:20:23 2001 from igloo.its.unimelb.edu.au
Fanfare!!!
You are successfully logged in to this server!!!
Connection to toady closed by remote host.
Connection to toady closed.
debug1: Transferred: stdin 0, stdout 0, stderr 73 bytes in 0.7 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 112.0
debug1: Exit status -1

But if I start sshd as an application in command prompt windows

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\Documents and Settings\terrence>c:\cygwin\usr\sbin\sshd.exe

I get my Win NT's prompt:

[terrence@igloo terrence]$ ssh toady
Last login: Thu Aug 23 12:48:01 2001 from igloo.its.unimelb.edu.au
Fanfare!!!
You are successfully logged in to this server!!!

terrence@TOADY ~


Any help and suggestions are highly appreciated.

Cheers,
-- 
Terrence Miao                       
The University of Melbourne                      ...   __o         
+61 3 8344 0361 terrence@unimelb.edu.au        ...    -\<,  
http://igloo.its.unimelb.edu.au                ... (_)/(_) ..


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]