From owner-freebsd-questions@FreeBSD.ORG Tue Feb 3 00:04:28 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7209E38 for ; Tue, 3 Feb 2015 00:04:28 +0000 (UTC) Received: from outbound-queue-1.mail.thdo.gradwell.net (outbound-queue-1.mail.thdo.gradwell.net [212.11.70.34]) by mx1.freebsd.org (Postfix) with ESMTP id 683ECA62 for ; Tue, 3 Feb 2015 00:04:28 +0000 (UTC) Received: from outbound-edge-2.mail.thdo.gradwell.net (bonnie.gradwell.net [212.11.70.2]) by outbound-queue-1.mail.thdo.gradwell.net (Postfix) with ESMTP id 4760821F40 for ; Tue, 3 Feb 2015 00:03:38 +0000 (GMT) Received: from cpc7-jarr12-2-0-cust882.16-2.cable.virginm.net (HELO amd.asgard.uk) (92.238.71.115) (smtp-auth username dave%pop3.dgmm.net, mechanism plain) by outbound-edge-2.mail.thdo.gradwell.net (qpsmtpd/0.83) with ESMTPA; Tue, 03 Feb 2015 00:03:38 +0000 From: Dave To: freebsd-questions@freebsd.org Subject: Re: [SOLVED] Passwordless ssh, keys not authenticating, asks for password Date: Tue, 03 Feb 2015 00:03:30 +0000 Message-ID: <2693256.fbzBTIN2Gq@amd.asgard.uk> User-Agent: KMail/4.14.2 (FreeBSD/9.3-RELEASE-p9; KDE/4.14.2; amd64; ; ) In-Reply-To: <2158037.0CyDn4nRuB@amd.asgard.uk> References: <2158037.0CyDn4nRuB@amd.asgard.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Gradwell-MongoId: 54d0105a.6737-4026-2 X-Gradwell-Auth-Method: mailbox X-Gradwell-Auth-Credentials: dave@pop3.dgmm.net X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 00:04:28 -0000 As is often the case, 2 minutes after I hit send, the answer leaped out at me from the deep, dark reaches of the web, namely: https://forums.freebsd.org/threads/stop-sshd-from-asking-for-password.33908/ ...where user robbak wisely said "If your home directory is 777, then it will fail!". I wasn't getting the stated error message but on checking, I had, for some long forgotten reason in the past, set /usr/home/dave to 777. It's now set to the default 755 and all is well again :-) On Monday 02 February 2015 23:47:23 Dave wrote: > Hi, > I'm trying to set up passwordless ssh login > > I have it working on all but one client, with no obvious reason why it's not > working on this one box. > > Box1 (ubuntu) uname -a > > Linux ubuntu 3.2.0-75-generic #110-Ubuntu SMP Tue Dec 16 19:11:28 UTC 2014 > i686 i686 i386 GNU/Linux > > > Box2 (testbox - working) uname -a > > FreeBSD testbox.asgard.uk 9.3-RELEASE-p9 FreeBSD 9.3-RELEASE-p9 #0: Tue Jan > 27 10:43:40 UTC 2015 root@amd64- > builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > > > Box3 (amd - not working) uname -a > > FreeBSD amd.asgard.uk 9.3-RELEASE-p9 FreeBSD 9.3-RELEASE-p9 #0: Tue Jan 27 > 10:43:40 UTC 2015 root@amd64- > builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > > > On Box1 I did > > ssh-keygen (default answers, no pass phrase) > ssh-copy-id dave@testbox > ssh-copy-id dave@amd > ssh-add > > > Boxes 2 and 3 have identical and default /etc/ssh/ssh_config and the > following are identical. > > ~/.ssh is chmod 700 > -rw------- 1 dave dave 797 2 Feb 22:10 authorized_keys > -rw-r--r-- 1 dave dave 165 6 Jan 23:27 known_host > > ssh dave@testbox (Box2 works fine) > ssh dave@amd (Box3 fails and asks for the password) > > > Results of ssh -v dave@amd (Box3) > > OpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012 > debug1: Reading configuration data /etc/ssh/ssh_config > debug1: /etc/ssh/ssh_config line 19: Applying options for * > debug1: Connecting to amd [192.168.1.3] port 22. > debug1: Connection established. > debug1: identity file /home/dave/.ssh/id_rsa type 1 > debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048 > debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048 > debug1: identity file /home/dave/.ssh/id_rsa-cert type -1 > debug1: identity file /home/dave/.ssh/id_dsa type -1 > debug1: identity file /home/dave/.ssh/id_dsa-cert type -1 > debug1: identity file /home/dave/.ssh/id_ecdsa type -1 > debug1: identity file /home/dave/.ssh/id_ecdsa-cert type -1 > debug1: Remote protocol version 2.0, remote software version > OpenSSH_6.6.1_hpn13v11 FreeBSD-20140420 > debug1: match: OpenSSH_6.6.1_hpn13v11 FreeBSD-20140420 pat OpenSSH* > debug1: Enabling compatibility mode for protocol 2.0 > debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.4 > 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 > xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx debug1: Host 'amd' is known > and matches the ECDSA host key. > debug1: Found key in /home/dave/.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,keyboard-interactive > debug1: Next authentication method: publickey > debug1: Offering RSA public key: /home/dave/.ssh/id_rsa > debug1: Authentications that can continue: publickey,keyboard-interactive > debug1: Offering RSA public key: dave@ubuntu > debug1: Authentications that can continue: publickey,keyboard-interactive > debug1: Trying private key: /home/dave/.ssh/id_dsa > debug1: Trying private key: /home/dave/.ssh/id_ecdsa > debug1: Next authentication method: keyboard-interactive > Password for dave@amd.asgard.uk: > > > Box3 (amd,the problembox) pkg info | grep ssh > > libssh-0.6.3_1 Library implementing the SSH1 and SSH2 > protocol linux-c6-libssh2-1.4.2_1 Library implementing the SSH2 > protocol (Linux CentOS 6.6 > > > Box (testbox,a working box) pkg info | grep ssh > > libssh-0.6.3_1 Library implementing the SSH1 and SSH2 > protocol > > To eliminate the potential difference, pkg info | grep ssh shows no results > on a 9.2 box where passwordless ssh works. I also successfully tested with > a RaspBMC box. > > I can only assume there is something different somewhere on Box3 (amd) that > I've changed and forgotten about. Is there anything else you need to know > to help me? > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"