From owner-freebsd-questions@FreeBSD.ORG Thu Aug 30 16:07:45 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 42E5D16A418 for ; Thu, 30 Aug 2007 16:07:45 +0000 (UTC) (envelope-from gandalf@shopzeus.com) Received: from viefep19-int.chello.at (viefep18-int.chello.at [213.46.255.22]) by mx1.freebsd.org (Postfix) with ESMTP id 82FC213C45B for ; Thu, 30 Aug 2007 16:07:44 +0000 (UTC) (envelope-from gandalf@shopzeus.com) Received: from [192.168.1.99] (really [80.99.119.201]) by viefep19-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20070830160742.JSAW5155.viefep19-int.chello.at@[192.168.1.99]> for ; Thu, 30 Aug 2007 18:07:42 +0200 Message-ID: <46D6EAB4.5060501@shopzeus.com> Date: Thu, 30 Aug 2007 18:05:08 +0200 From: Laszlo Nagy User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: 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 16:07:45 -0000 Hi, I have to boxes, both are FreeBSD 6.2 -p7. I did this: user1@box1: ssh-keygen -t dsa mv ~/.ssh/id_dsa.pub ~/.ssh/authorized_keys chmod 640 ~/.ssh/authorized_keys scp ~/.ssh/id_dsa user2@box2:~/.ssh user2@box2: mkdir .ssh cat > .ssh/config host mybox hostname box1 identityfile /home/user2/.ssh/id_dsa compression yes cipher blowfish protocol 2 ^D Then I try this: ssh -l user1 mybox but it asks for a password. I also tried this: ssh -v -v -v -l user1 mybox This is what I see (just a part of it): debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug3: check_host_in_hostfile: filename /usr/user2/.ssh/known_hosts debug3: check_host_in_hostfile: match line 1 debug1: Host 'box1' is known and matches the DSA host key. debug1: Found key in /usr/user2/.ssh/known_hosts:1 debug2: bits set: 526/1024 debug1: ssh_dss_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /usr/user2/.ssh/id_dsa (0x8032410) debug1: Authentications that can continue: publickey,keyboard-interactive debug3: start over, passed a different list publickey,keyboard-interactive debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering public key: /usr/user2/.ssh/id_dsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: Authentications that can continue: publickey,keyboard-interactive debug2: we did not send a packet, disable method debug3: authmethod_lookup keyboard-interactive debug3: remaining preferred: password debug3: authmethod_is_enabled keyboard-interactive debug1: Next authentication method: keyboard-interactive debug2: userauth_kbdint debug2: we sent a keyboard-interactive packet, wait for reply debug2: input_userauth_info_req debug2: input_userauth_info_req: num_prompts 1 Password: What is the problem? I could do the same with other computers/users without problem. I'm sure that I do something wrong. Thanks, Laszlo