X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=xra9i/A/JGgCDglr a30swnWrKtXhBwy7qPYRjMmhr5cWbxe99qorOaFXqIndNjL7dTcKhCxufsaItiml 2w5JcUVUIp3g4os5pw3oSAnZD+hzPUdnvHAwxCQr0ZXGf7H6Td5IESNF4VgUJhWv 55q0Why0KRyMVAqwzo/ObfksuKE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=7qE+ik7Ox2UPFY6QMkz6uU Acpr0=; b=EM86PMIKL+PY8mBzSZI9t6+NHkuJtHwjNWXE9LYR/xjwNzBa+I+MXm pk3S/nyKixWeEHZprw02ypWipU/X3BT9+2Z+ng5lKYQc8TRsLNFjvig2QkiiJH2+ IG5yUDmnB7j57LBqAoz8BH0dr728wWGezAdeqeDI2FYE/S0gKq6iY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: Yes, score=6.2 required=5.0 tests=AWL,BAYES_99,FREEMAIL_FROM,KAM_THEBAT,RDNS_NONE,SPF_SOFTFAIL,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: smtpback.ht-systems.ru Date: Mon, 18 Nov 2013 12:22:33 +0400 From: Andrey Repin Reply-To: Andrey Repin Message-ID: <1679047089.20131118122233@mtu-net.ru> To: Andrea Venturoli , cygwin AT cygwin DOT com Subject: Re: Sshd and key based authentication In-Reply-To: <5289C8BD.1010109@netfence.it> References: <5289C8BD DOT 1010109 AT netfence DOT it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Greetings, Andrea Venturoli! > I'm trying to set up sshd on a Windows 2003 domain controller. > Everything works with password authentication; however I need this for a > script, so, in order to get non-interactive login, I must use keys. > Tried as hard as I could, but I could not achieve this: I'm always asked > for a password. > I read several posts which say I need to use local accounts, not domain > accounts; however, the machine being a DC, I don't have Local security > policy or Local users in Control panel or Administrative tool. > So, this is the fragment from my /etc/passwd: >> sshd:unused:2259:513:sshd privsep,U-MYDOMAIN\sshd,S-X-X-XX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXX:/var/empty:/bin/false >> cyg_server:unused:2265:513:cyg_server,U-MYDOMAIN\cyg_server,S-X-X-XX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXXX-XXXX:/home/cyg_server:/bin/bash > "ssh -vvv" suggest the key is presented to the server, but key > authentication does not succeed anyway. Nothing special is logged > server-side and ssh moves on to password authentiation. > On with the questions... > Is this supposed to work? Several posts say so, but no one mentions a > domain controller... Does it bring in anything special? Not that I know of. > Are the above users correct? Any problem with it? They are irrelevant. Both only used to start up the service. > What are correct ownership and permissions of /home, /home/myuser, > /home/myuser/.ssh and /home/myuser/.ssh/authorized_keys? sshd only check permissions on $HOME/.ssh and authorized_keys (as far as I'm aware) - they need to be (as a safest bet) owned by user logging in and don't have write permission by anyone except the owner (and SYSTEM). > According to some how-tos, ssh-host-confing should have prompted with > "CYGWIN=" and I should have replied "tty ntsec", Long time gone. http://cygwin.com/cygwin-ug-net/using-cygwinenv.html#cygwinenv-removed-options > but this did not > happen. Other how-tos suggest putting this variable in the environment. > Is this information current or obsolete? I tried and it didn't seem to > matter... > Any other hint? Did you installed Cygwin LSA module? http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd2 -- WBR, Andrey Repin (anrdaemon AT yandex DOT ru) 18.11.2013, <12:13> Sorry for my terrible english... -- 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