openssh client won't do publickey auth

From: Marc Remijn (marc@nospam.org)
Date: 11/18/02

  • Next message: Bert Geys: "SSH web based"
    From: Marc Remijn <marc@nospam.org>
    Date: Mon, 18 Nov 2002 15:53:10 +0100
    
    

    I have 2 machines:

    One runs sshd 2.4.0. I have succesfully connected to this host with
    publickey authentication from other machines. Let's call this machine1.

    I have installed a new machine, with Slackware 8.1. This has openSSH
    preinstalled. Let's call this machine2.

    On machine2 I generate a version 2 rsa key with:

    ssh-keygen -t rsa

    This results in:

    id_rsa private key
    id_rsa.pub public key

    I put the public key on machine1 (on useraccount, (same accountname I
    use on machine2)).
    Changed ~/.ssh2/authorization by adding:

    Key id_rsa.pub

    Now I log into machine1 from machine2.

    dubhead = machine1
    dubhead2 = machine2

    marc@dubhead2:~$ ssh -v -2 dubhead
    OpenSSH_3.2.3p1, SSH protocols 1.5/2.0, OpenSSL 0x0090604f
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Rhosts Authentication disabled, originating port will not be
    trusted.
    debug1: restore_uid
    debug1: ssh_connect: getuid 1000 geteuid 0 anon 1
    debug1: Connecting to dubhead [192.168.100.1] port 22.
    debug1: temporarily_use_uid: 1000/100 (e=0)
    debug1: restore_uid
    debug1: temporarily_use_uid: 1000/100 (e=0)
    debug1: restore_uid
    debug1: Connection established.
    debug1: read PEM private key done: type DSA
    debug1: read PEM private key done: type RSA
    debug1: identity file /home/marc/.ssh/id_rsa type 1
    debug1: identity file /home/marc/.ssh/id_dsa type -1
    debug1: Remote protocol version 1.99, remote software version 3.1.0 SSH
    Secure Shell (non-commercial)
    debug1: no match: 3.1.0 SSH Secure Shell (non-commercial)
    Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_3.2.3p1
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: dh_gen_key: priv key bits set: 118/256
    debug1: bits set: 509/1024
    debug1: sending SSH2_MSG_KEXDH_INIT
    debug1: expecting SSH2_MSG_KEXDH_REPLY
    debug1: Host 'dubhead' is known and matches the DSA host key.
    debug1: Found key in /home/marc/.ssh/known_hosts:1
    debug1: bits set: 533/1024
    debug1: ssh_dss_verify: signature correct
    debug1: kex_derive_keys
    debug1: newkeys: mode 1
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: waiting for SSH2_MSG_NEWKEYS
    debug1: newkeys: mode 0
    debug1: SSH2_MSG_NEWKEYS received
    debug1: done: ssh_kex2.
    debug1: send SSH2_MSG_SERVICE_REQUEST
    debug1: service_accept: ssh-userauth
    debug1: got SSH2_MSG_SERVICE_ACCEPT
    debug1: authentications that can continue: publickey,password
    debug1: next auth method to try is publickey
    debug1: try pubkey: /home/marc/.ssh/id_rsa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    debug1: authentications that can continue: publickey,password
    debug1: try privkey: /home/marc/.ssh/id_dsa
    debug1: next auth method to try is password
    marc@dubhead's password:

    Why does it say: 'try pubkey: /home/marc/.ssh/id_rsa' while this is not
    a public key but a private key.

    As you can see publickey authorisation does not work, so I'am left with
    password authentication.

    Marc



    Relevant Pages

    • RE: Ssh with public key authentication
      ... Ssh with public key authentication ... debug1: Host 'machine1' is known and matches the RSA host key. ... debug3: preferred publickey,keyboard-interactive,password ... debug3: authmethod_is_enabled publickey ...
      (RedHat)
    • multinet public key question
      ... but authentication fails. ... debug1: Connecting to ... ... debug3: key_read: missing keytype ... debug3: authmethod_is_enabled publickey ...
      (comp.os.vms)
    • Public Key authentication not responding to public key?
      ... I'm having difficulties setting up public key authentication ... debug3: preferred publickey,keyboard-interactive,password ... debug3: authmethod_is_enabled publickey ... debug1: Next authentication method: publickey ...
      (comp.security.ssh)
    • public key authentication problem
      ... I'm trying to use public key authentication for ssh, ... debug3: preferred publickey,keyboard-interactive,password ... debug3: authmethod_is_enabled publickey ... debug1: Next authentication method: publickey ...
      (SSH)
    • ssh: problem with publickey authentication
      ... I have trouble getting ssh with publickey authentication to work. ... debug1: Connection established. ...
      (SSH)