delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/01/21:09:15

X-Spam-Check-By: sourceware.org
Date: Thu, 2 Feb 2006 03:08:55 +0100 (MET)
From: "Fabian Pauly" <Fabian DOT Pauly AT gmx DOT de>
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Subject: Problems with sshd under Windows XP
X-Authenticated: #2029278
Message-ID: <25407.1138846135@www076.gmx.net>
X-Flags: 0001
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

I tried to use sshd under Windows XP. Proceeding in the way described in 
http://pigtail.net/LRP/printsrv/cygwin-sshd.html
or 
http://www.wintotal.de/Artikel/ftpserver/ftpserver2.php.

Which means I used UsePrivilegeSeparation yes in /etc/sshd_config

However then I got the errors

fpauly AT Venus:/home/fpauly > cygrunsrv.exe -S sshd
cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
Der Dienst wurde nicht gestartet.

fpauly AT Venus:/home/fpauly > 

/var/log/sshd show then 

fpauly AT Venus:/home/fpauly > m /var/log/sshd.log 
Privilege separation user sshd does not exist

Although took care of setting the right of /var/empty, /etc/ssh_h* correctly
I could not start sshd.
chown -R system:system /var/log/sshd.log /var/empty /etc/ssh_h*

Thus the next try was with "UsePrivilegeSeparation no" (after a cygrunsrv 
--remove sshd). 
fpauly AT Venus:/home/fpauly > cygrunsrv.exe --remove sshd
fpauly AT Venus:/home/fpauly > ssh-host-config 
Overwrite existing /etc/ssh_config file? (yes/no) yes
Generating /etc/ssh_config file
Overwrite existing /etc/sshd_config file? (yes/no) yes
Privilege separation is set to yes by default since OpenSSH 3.3.
However, this requires a non-privileged account called 'sshd'.
For more info on privilege separation read
/usr/share/doc/openssh/README.privsep.

Should privilege separation be used? (yes/no) no
Generating /etc/sshd_config file


Warning: The following functions require administrator privileges!

Do you want to install sshd as service?
(Say "no" if it's already installed as service) (yes/no) yes

Which value should the environment variable CYGWIN have when
sshd starts? It's recommended to set at least "ntsec" to be
able to change user context without password.
Default is "ntsec".  CYGWIN=ntsec

The service has been installed under LocalSystem account.
To start the service, call `net start sshd' or `cygrunsrv -S sshd'.

Host configuration finished. Have fun!
fpauly AT Venus:/home/fpauly > 

Now sshd starts sucesfully (only that /usr/sbin/ssh -D seems to complain)

fpauly AT Venus:/home/fpauly > cygrunsrv.exe --start sshd
fpauly AT Venus:/home/fpauly > /usr/sbin/sshd.exe -Q
Could not load host key: /etc/ssh_host_key
Could not load host key: /etc/ssh_host_rsa_key
Could not load host key: /etc/ssh_host_dsa_key
Disabling protocol version 1. Could not load host key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.
fpauly AT Venus:/home/fpauly > cygrunsrv.exe --stop sshd
fpauly AT Venus:/home/fpauly > /usr/sbin/sshd.exe -D
Could not load host key: /etc/ssh_host_key
Could not load host key: /etc/ssh_host_rsa_key
Could not load host key: /etc/ssh_host_dsa_key
Disabling protocol version 1. Could not load host key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.
fpauly AT Venus:/home/fpauly > 
fpauly AT Venus:/home/fpauly > cygrunsrv.exe --stop sshd
fpauly AT Venus:/home/fpauly > net start sshd
CYGWIN sshd wird gestartet.
CYGWIN sshd wurde erfolgreich gestartet.

fpauly AT Venus:/home/fpauly > 

(Erfolgeich gestartet means sucessfully started.)



However now the ssh connection to my computer cannot be established

fpauly AT tfplx28:/users/tfp/fpauly > ssh -v tfpfpnote
OpenSSH_3.8.1p1 Debian-8.sarge.4, OpenSSL 0.9.7e 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for tfp*
debug1: Connecting to tfpfpnote [172.22.185.139] port 22.
debug1: Connection established.
debug1: identity file /users/tfp/fpauly/.ssh/identity type 0
debug1: identity file /users/tfp/fpauly/.ssh/id_rsa type -1
debug1: identity file /users/tfp/fpauly/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1 Debian-8.sarge.4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
72:88:64:1e:23:ef:ea:46:66:1c:e4:13:f6:d3:8a:de.
Please contact your system administrator.
Add correct host key in /users/tfp/fpauly/.ssh/known_hosts to get rid of
this message.
Offending key in /users/tfp/fpauly/.ssh/known_hosts:100
RSA host key for tfpfpnote has changed and you have requested strict
checking.
Host key verification failed.
fpauly AT tfplx28:/users/tfp/fpauly > 

When I try 

fpauly AT Venus:/home/fpauly > ssh localhost
fpauly AT localhost's password: 
Permission denied, please try again.
fpauly AT localhost's password: 
Permission denied, please try again.
fpauly AT localhost's password: 
Permission denied (publickey,password,keyboard-interactive).
fpauly AT Venus:/home/fpauly > 


I am asked for a password I don't know. 

I already tried to edit /etc/passwd (see below) and also using
ssh-user-config didn't help in changing this behviour.


fpauly AT Venus:/home/fpauly > m
/etc/passwd
SYSTEM:*:18:544:,S-1-5-18::
Administratoren:*:544:544:,S-1-5-32-544::
Administrator:unused_by_nt/2000/xp:500:513:U-VENUS\Administrator,S-1-5-21-3582548498-2752991226-3942243025-500:/home/Administrator:/bin/bash
fpauly:unused_by_nt/2000/xp:1005:513:fpauly,U-VENUS\fpauly,S-1-5-21-3582548498-2752991226-3942243025-1005:/home/fpauly:/bin/bash
Gast:unused_by_nt/2000/xp:501:513:U-VENUS\Gast,S-1-5-21-3582548498-2752991226-3942243025-501:/home/Gast:/bin/bash
Hilfeassistent:unused_by_nt/2000/xp:1004:513:Hilfeassistentenkonto für den
Remotedesktop,U-VENUS\Hilfeassistent,S-1-5-21-3582548498-2752991226-3942
243025-1004:/home/Hilfeassistent:/bin/bash
sshd:unused_by_nt/2000/xp:1008:513:sshd
privsep,U-VENUS\sshd,S-1-5-21-3582548498-2752991226-3942243025-1008:/var/empty:/bin/bash
SUPPORT_388945a0:unused_by_nt/2000/xp:1002:513:CN=Microsoft
Corporation,L=Redmond,S=Washington,C=US,U-VENUS\SUPPORT_388945a0,S-1-5-21-3582548498-2
752991226-3942243025-1002:/home/SUPPORT_388945a0:/bin/bash
fpauly AT Venus:/home/fpauly > 

I would be very happy, if someone could help me to get the sshd running and
copy files from linux to a windows xp-system.

Thanks in advance, Fabian. 


-- 
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

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

- Raw text -


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