delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/02/04/11:12:26

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=2.0 required=5.0 tests=AWL,BAYES_00,BOTNET,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
Message-id: <510FDDBD.3050708@cygwin.com>
Date: Mon, 04 Feb 2013 11:11:41 -0500
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-to: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
MIME-version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Unable to log in to SSH Server using Cygwin
References: <CAJTy7oA07cZ2FkO_bYg9ObupFMn=2+cXx2zZr3SbD-3sz5=D=g AT mail DOT gmail DOT com>
In-reply-to: <CAJTy7oA07cZ2FkO_bYg9ObupFMn=2+cXx2zZr3SbD-3sz5=D=g@mail.gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

On 2/4/2013 4:13 AM, Jeffrey Cheng wrote:
> Hello,
>
> I've been trying to set up an SSH server in Cygwin and I haven't been
> able to successfully log in to the localhost. Following some online
> tutorials, I have set up a public/private key pair, ran
> ssh-host-config and then when attempting to log in, I get the below
> output:
>
> $ ssh -v -i ~/.ssh/id_dsa [user]@[hostname]
> OpenSSH_6.1p1, OpenSSL 1.0.1c 10 May 2012
> debug1: Reading configuration data /etc/ssh_config
> debug1: Connecting to [host] [host ip] port 22.
> debug1: Connection established.
> debug1: identity file /home/[user]/.ssh/id_dsa type 2
> debug1: identity file /home/[user]/.ssh/id_dsa-cert type -1
> debug1: Remote protocol version 2.0, remote software version OpenSSH_6.1
> debug1: match: OpenSSH_6.1 pat OpenSSH*
> debug1: Enabling compatibility mode for protocol 2.0
> debug1: Local version string SSH-2.0-OpenSSH_6.1
> debug1: SSH2_MSG_KEXINIT sent
> debug1: SSH2_MSG_KEXINIT received
> debug1: kex: server->client aes128-ctr hmac-md5 none
> debug1: kex: client->server aes128-ctr hmac-md5 none
> debug1: sending SSH2_MSG_KEX_ECDH_INIT
> debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
> debug1: Server host key: ECDSA f4:15:10:b9:7e:8e:61:a4:e8:b9:e4:4b:9b:98:cb:82
> debug1: Host '[host]' is known and matches the ECDSA host key.
> debug1: Found key in /home/[user]/.ssh/known_hosts:1
> debug1: ssh_ecdsa_verify: signature correct
> debug1: SSH2_MSG_NEWKEYS sent
> debug1: expecting SSH2_MSG_NEWKEYS
> debug1: SSH2_MSG_NEWKEYS received
> debug1: Roaming not allowed by server
> debug1: SSH2_MSG_SERVICE_REQUEST sent
> debug1: SSH2_MSG_SERVICE_ACCEPT received
> debug1: Authentications that can continue:
> publickey,password,keyboard-interactive
> debug1: Next authentication method: publickey
> debug1: Offering DSA public key: /home/[user]/.ssh/id_dsa
> Connection closed by [host ip]
>
> It seems that as soon as it tries to authenticate the private key, I
> get the "Connection closed" message. Has anyone experienced this and
> is aware of a solution?
>
> I'm running Cygwin 1.7.17 on Windows Server 2003. My Windows user
> account has administrative privileges.
>
> I've tried running ssh into this box from my local Windows PC and am
> actually able to use password authentication. However, I have a
> requirement that I muse use public key authentication. This at least
> tells me there shouldn't be any firewall issue.
>
> Any help in this matter would be appreciated.

If you can login with a password, then I agree that this sounds like
some kind of authentication problem.  Without more detail, I can only
guess as to the cause.  But the first thing I would say is to make
sure the user you log in as is a local user for the machine you're
trying to reach.  Second, it's conspicuous that you didn't mention
ssh-user-config.  You may just need to run that to generate the
proper keys for you to use.  If that doesn't help, my next WAG is to
try setting up a RSA (rather than DSA) key.  Both should work but RSA
is the more traditional route and may get you further.

If none of the above helps, I'd recommend checking out the openssh
README for Cygwin at /usr/share/doc/Cygwin/openssh.README.  You could
also go back to the authors of the online tutorials you used to set
up your server, etc.  Honestly, lots of what's out there is dated,
incomplete, or just plain wrong so you may find it more expedient to
start over than debug the process you followed.  But if you would
rather debug, consult the source for further help.

If none of the above helps and you have things set up as described in
the Cygwin documentation, please follow the problem reporting guidelines
at the link below with any follow-up to this list.  It will help bootstrap
the process.

> Problem reports:       http://cygwin.com/problems.html

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
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

- Raw text -


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