Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    ssh: Permission denied (publickey,keyboard-interactive)


    I'm using linux system
    I created a ssh key on local directory
    $ ssh-keygen -t rsa -f ~/.ssh/id_rsa

    and then uploaded the public key to planetLab system

    then I tried to log in a PlanetLab node using: ssh -v
    the debug information is as follows:
    Code:
            OpenSSH_5.8p2, OpenSSL 1.0.0j-fips 10 May 2012
            debug1: Reading configuration data /etc/ssh/ssh_config
            debug1: Applying options for *
            debug1: Connecting to openlab01.pl.sophia.inria.fr [138.96.116.22] port 22. 
            debug1: Connection established.
            debug1: identity file /user/wgong/home/.ssh/id_rsa type 1
            debug1: identity file /user/wgong/home/.ssh/id_rsa-cert type -1
            debug1: identity file /user/wgong/home/.ssh/id_dsa type -1
            debug1: identity file /user/wgong/home/.ssh/id_dsa-cert type -1
            debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5
            debug1: match: OpenSSH_5.5 pat OpenSSH*
            debug1: Enabling compatibility mode for protocol 2.0 
            debug1: Local version string SSH-2.0-OpenSSH_5.8
            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: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
            debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
            debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
            debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
            debug1: Server host key: RSA 3b:a4:2a:ec:89:d0:7b:d7:b2:08:fe:ca:0d:24:ae:20
            debug1: Host 'openlab01.pl.sophia.inria.fr' is known and matches the RSA host key.
            debug1: Found key in /user/wgong/home/.ssh/known_hosts:10
            debug1: ssh_rsa_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: /user/wgong/home/.ssh/id_rsa
            debug1: Authentications that can continue: publickey,keyboard-interactive
            debug1: Trying private key: /user/wgong/home/.ssh/id_dsa
            debug1: Next authentication method: keyboard-interactive
            debug1: Authentications that can continue: publickey,keyboard-interactive
            debug1: No more authentication methods to try.
            Permission denied (publickey,keyboard-interactive).
    how to deal with this problem? thanks!

    I notice a problem, previously, our group is tika
    now it is changed to uslin
    however, even if I deleted the previous keys and use
    ssh-keygen to generate new keys, the group is still as below:
    Code:
        -rw------- 1 wgong tika 1766 Mar  6 19:06 id_rsa
        -rw-r--r-- 1 wgong tika  394 Mar  6 19:06 id_rsa.pub
        -rw-r--r-- 1 wgong uslin   3987 Mar  6 18:11 known_hosts
    is this the problem?
    how to fix it?
    thanks!

  2. #2
    Quote Originally Posted by esolve View Post
    and then uploaded the public key to planetLab system
    How did you upload it exactly? It needs to be in a specific file, with specific permissions. To make things easier on you, you can use the script ssh-copy-id, which should have come with your OpenSSH package.

    You'd use it like this:
    Code:
    ssh-copy-id -i ~/.ssh/id_rsa.pub username@remotehost
    You'll be prompted for the password on the remote host. When it is done, the contents of the public key (~/.ssh/id_rsa.pub) should be appended on the remote machine to the following file:
    Code:
    ~/.ssh/authorized_keys
    Then you should be able to remotely log in, without a password. here's a simple way to test:
    Code:
    ssh -oPasswordAuthentication=no username@remotehost 'echo SUCCESS'

  3. #3
    Quote Originally Posted by atreyu View Post
    How did you upload it exactly? It needs to be in a specific file, with specific permissions. To make things easier on you, you can use the script ssh-copy-id, which should have come with your OpenSSH package.

    You'd use it like this:
    Code:
    ssh-copy-id -i ~/.ssh/id_rsa.pub username@remotehost
    You'll be prompted for the password on the remote host. When it is done, the contents of the public key (~/.ssh/id_rsa.pub) should be appended on the remote machine to the following file:
    Code:
    ~/.ssh/authorized_keys
    Then you should be able to remotely log in, without a password. here's a simple way to test:
    Code:
    ssh -oPasswordAuthentication=no username@remotehost 'echo SUCCESS'

    for PlanetLab there is a special web interface which can be used to upload the public key
    I have done it before on another machine and it works fine

    so the problem is not in uploading the public key
    but in the local machine

  4. $spacer_open
    $spacer_close
  5. #4
    debug1: Next authentication method: publickey
    debug1: Offering RSA public key: /user/wgong/home/.ssh/id_rsa
    debug1: Authentications that can continue: publickey,keyboard-interactive
    debug1: Trying private key: /user/wgong/home/.ssh/id_dsa
    Perhaps you need DSA keys locally, not RSA keys, e.g.;

    Code:
    ssh-keygen -t dsa -f ~/.ssh/id_dsa

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •