From owner-freebsd-questions@FreeBSD.ORG Thu Aug 30 18:22:59 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8709716A417 for ; Thu, 30 Aug 2007 18:22:59 +0000 (UTC) (envelope-from gandalf@shopzeus.com) Received: from viefep14-int.chello.at (viefep18-int.chello.at [213.46.255.22]) by mx1.freebsd.org (Postfix) with ESMTP id C1CC813C442 for ; Thu, 30 Aug 2007 18:22:58 +0000 (UTC) (envelope-from gandalf@shopzeus.com) Received: from [192.168.1.99] (really [80.99.119.201]) by viefep14-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20070830182238.SMLB27206.viefep14-int.chello.at@[192.168.1.99]>; Thu, 30 Aug 2007 20:22:38 +0200 Message-ID: <46D70A51.5020700@shopzeus.com> Date: Thu, 30 Aug 2007 20:20:01 +0200 From: Laszlo Nagy User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 To: Yuri Pankov , freebsd-questions@freebsd.org References: <46D6EAB4.5060501@shopzeus.com> <46D6ECEA.5090107@crackmonkey.us> <46D6F712.8070905@shopzeus.com> <20070830172743.GB46255@darklight.org.ru> In-Reply-To: <20070830172743.GB46255@darklight.org.ru> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: ssh2 login with public key - not working X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2007 18:22:59 -0000 > > Have you checked /var/log/auth.log on machine to which you are trying to > connect? > It contains nothing except: Aug 30 13:54:19 box1 sshd[8199]: Accepted publickey for user2 from 81.1.19.245 port 54369 ssh2 Now here is what I did: 1. I deleted user2 with "rmuser user2", but I did not delete its home directory 2. I re-created the user Now it is working! It was so confusing that I tried another thing. Then I tried this with root@box2: rm -fr /root/.ssh cp ~user2/.ssh /root chown -R root:wheel /root/.ssh chmod 700 /root/.ssh chmod 600 /root/.ssh/* chmod 700 /root ssh -l user1 mybox Same problem - not working. Unfortunately, auth.log on box1 only prints a line when it accepts a public key. There are no auth failures because the problem occurs when ssh tries to determine the type of the authentication. Do you have any idea why the recreation of the user solved the problem? And how it is possible that using exactly the same ssh config, the root user cannot login with a public key? (Obviously, I cannot recreate the root user....) Thanks, Laszlo