Not the answer you need?
Register and ask your own question!

cannot login with public key

MorenoMoreno EntrantInactive User Role Beginner
Hello
I have installed pmm-server and I can log data from my clients, but I cannot login to the pmm server.

I created the public key and set it through the web interface during setup, but when I try to log in, I get this message:

sign_and_send_pubkey: signing failed: agent refused operation
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).


The key is the following
2048 SHA256:EyfiOgKJidxr/pOiFtSjlzpaVkjsOQfpKX0n762SgLg /home/mox/.ssh/id_rsa.pub (RSA)

I tried different way to log in, I found in the forum several suggestions, like using different login names (admin, pmm), but I couldn't manage to connect.

Thanks

Moreno


p.s.
Below the debug log from ssh

debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.178.59 [192.168.178.59] port 22.
debug1: Connection established.
debug1: identity file id_rsa.pub type 1
debug1: key_load_public: No such file or directory
debug1: identity file id_rsa.pub-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to 192.168.178.59:22 as 'mox'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:tBmNep22sfXseHo1INDzjF7vy6KsR3vUhNBbLUSBIgM
debug1: Host '192.168.178.59' is known and matches the ECDSA host key.
debug1: Found key in /home/mox/.ssh/known_hosts:36
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available

debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available

debug1: Unspecified GSS failure. Minor code may provide more information


debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available

debug1: Next authentication method: publickey
debug1: Offering RSA public key: id_rsa.pub
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Offering RSA public key: /home/mox/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Comments

  • Michael CoburnMichael Coburn Principal Architect, Percona Percona Staff Role
    Hi Moreno

    Can you please paste the full command line you used? This example is showing you using user 'mox'
    debug1: Authenticating to 192.168.178.59:22 as 'mox'
  • MykolaMykola Percona Percona Staff Role
    also please share output of these commands, it is ssh key digest (identifier)
    ssh-keygen -y -f /home/mox/.ssh/id_rsa | ssh-keygen -lf -
    curl http://USER:PASS&#64;192.168.178.59/configurator/v1/sshkey
    
    (please replace USER:PASS by right http credentials)
  • MorenoMoreno Entrant Inactive User Role Beginner
    Hello
    thanks for the reply

    Here the data that you requested (yes Michael you are right, I generated the keys for a normal user as mox)
    ssh -i .ssh/id_rsa.pub [email protected]

    Mykola the output is the following

    $ssh-keygen -y -f /home/mox/.ssh/id_rsa | ssh-keygen -lf -
    2048 SHA256:EyfiOgKJidxr/pOiFtSjlzpaVkjsOQfpKX0n762SgLg no comment (RSA)

    $curl http://mox:[email protected]/configurator/v1/sshkey
    {"type":"ssh-rsa","fingerprint":"SHA256:EyfiOgKJidxr/pOiFtSjlzpaVkjsOQfpKX0n762SgLg"}

    regards

    Moreno
  • MykolaMykola Percona Percona Staff Role
    please ssh to 'admin' user.

    ssh -i .ssh/id_rsa.pub [email protected]

    this information should be added to documentation in https://jira.percona.com/browse/PMM-650
  • MorenoMoreno Entrant Inactive User Role Beginner
    Hello
    I tried but still no luck
    $ssh -i .ssh/id_rsa.pub [email protected]
    sign_and_send_pubkey: signing failed: agent refused operation
    Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
  • MykolaMykola Percona Percona Staff Role
    oh, sorry, please use private key for connecting id_rsa (not id_rsa.pub)
    ssh -i .ssh/id_rsa admin&#64;192.168.178.59
    
  • MorenoMoreno Entrant Inactive User Role Beginner
    Hi Mykola
    thanks for the update, using the private key I could login and everything is fine now :)
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.