delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/06/07/09:17:29

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:to:message-id:subject
:mime-version:content-type:content-transfer-encoding; q=dns; s=
default; b=kUcpr2kcvQf/5La198RmTc9o5bX5P01ee0Ml0aU1b7rVpHl1gHeQ0
yjRBNnqF1HCksO/dPGaLcvqU+ADE9cZlsXrTE2InUAgngjxorm3ifQfETxWubxOk
YtvI92/Q8nFkC6q0KtrNGC4ypnQSC9Cw83Prk9E+vpLcK3Y2n/P/Vs=
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:to:message-id:subject
:mime-version:content-type:content-transfer-encoding; s=default;
bh=1GCC5Vip39nEWMSFDmStvXk4/8I=; b=WEwTu1Svjt0jajel2ZvgKMsyvHdK
16InQ06Cje0uB9VeT7G12FVQbPtgyQzDpGIFB+tGYXXGbPCNTMqIwvhLOepuyLVX
s+ZML4AMAct3k/C6OJbIw8ds3c8i2BihjTOI16EXLTR4b28mu4FELIbGHNNhNe85
I6Q2oijbEOAoQWQ=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=3.6 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_COUK,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2
X-HELO: nm12-vm4.bullet.mail.ir2.yahoo.com
Date: Sun, 7 Jun 2015 13:16:53 +0000 (UTC)
From: Marilo <narium85-mlscar AT yahoo DOT co DOT uk>
Reply-To: Marilo <narium85-mlscar AT yahoo DOT co DOT uk>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Message-ID: <267325919.9857838.1433683013056.JavaMail.yahoo@mail.yahoo.com>
Subject: Re: I can't connect to ssh
MIME-Version: 1.0
X-IsSubscribed: yes

On Sunday, 7 June 2015, 3:48, Jim Garrison <jhg AT jhmg DOT net> wrote: 
On 6/6/2015 6:15 PM, Marilo wrote: 
>> 
>> 
>> harvey AT samsung350 ~ 
>> $ nc 127.0.0.1 22 
>> SSH-2.0-OpenSSH_6.6.1 
>> 
>> 
>> harvey AT samsung350 ~ 
>> $ ssh 127.0.0.1 
>> Connection closed by 127.0.0.1 
>> 
>> 
>> I have no authorized_keys file which is fine. I am allowing PasswordAuthentication and also PubKeyAuthentication on the server. 
>> My password is not empty. 
>> 
>> It is not prompting me for any password. It just straight away says "connection closed by 127.0.0.1" 
>> 
>> I don't have any other computers on the network that I can try from at the moment. 
[snip] 

>Check the permissions on the public key file and authorized_keys in 
>~/.ssh (and the .ssh directory itself).  If the target were Linux you 

>could also look in /var/log/secure to see why the remote closed the 

>connection.  On a cygwin remote system I don't know where the log is 
>located, but somebody else on the list can probably tell you. 


Below I have checked all of those i'm not sure if the owner is necessarily ok but the rest seems definitely ok. 

harvey AT samsung350 /var 
$ ls -l /var/log/sshd.log 
-rw-r--r-- 1 SYSTEM root 4489 May 13 03:41 /var/log/sshd.log 
So it hasn't been written to recently 


harvey AT samsung350 /var 
$ tail -n 1 /var/log/sshd.log 
/var/empty must be owned by root and not group or world-writable. 
ok that's an old error 


harvey AT samsung350 /var 
$ ls -ld /var/empty 
drwxr-xr-x+ 1 SYSTEM root 0 Aug 29 2014 /var/empty 
permissions are fine I guess.  I'm not sure if owner should say root. 



Permissions for ~/.ssh and its contents is absolutely correct.  I have no ~/.ssh/authorized_keys file though that's ok not to have that. 
harvey AT samsung350 /var 
$ ls -ld ~/.ssh 
drwx------+ 1 harvey None 0 Jun 7 01:38 /home/harvey/.ssh 

harvey AT samsung350 /var 
$ ls -l ~/.ssh 
total 19 
-rw------- 1 harvey None 1679 Aug 29 2014 id_rsa 
-rw------- 1 harvey None 399 Aug 29 2014 id_rsa.pub 
-rw------- 1 harvey None 1679 Sep 4 2014 id2_rsa 
-rw-r--r-- 1 harvey None 870 Jun 6 23:07 known_hosts 
-rw-r--r-- 1 harvey None 361 Sep 5 2014 known_hosts.bak 
-rw-r--r-- 1 harvey None 867 Sep 8 2014 known_hostsb 
-rw-r--r-- 1 harvey None 38 May 21 06:47 oldconfig 

harvey AT samsung350 /var 
$ 


I guess my server keys permissions are ok. I'm not sure if owner should be root 
harvey AT samsung350 /etc 
$ ls -l ssh_* 
-rw-rwxr-- 1 SYSTEM root 1574 Jun 7 01:35 ssh_config 
-rw------- 1 SYSTEM root 668 Aug 29 2014 ssh_host_dsa_key 
-rw-r--r-- 1 SYSTEM root 607 Aug 29 2014 ssh_host_dsa_key.pub 
-rw------- 1 SYSTEM root 227 Aug 29 2014 ssh_host_ecdsa_key 
-rw-r--r-- 1 SYSTEM root 179 Aug 29 2014 ssh_host_ecdsa_key.pub 
-rw------- 1 SYSTEM root 411 Aug 29 2014 ssh_host_ed25519_key 
-rw-r--r-- 1 SYSTEM root 99 Aug 29 2014 ssh_host_ed25519_key.pub 
-rw------- 1 SYSTEM root 982 Aug 29 2014 ssh_host_key 
-rw-r--r-- 1 SYSTEM root 647 Aug 29 2014 ssh_host_key.pub 
-rw------- 1 SYSTEM root 1675 Aug 29 2014 ssh_host_rsa_key 
-rw-r--r-- 1 SYSTEM root 399 Aug 29 2014 ssh_host_rsa_key.pub

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