problem getting key-based ssh login to work

  • hi folks,


    Great project -- thanks!


    I'm having trouble getting key-based ssh login to work...


    I installed from Debian Wheezy using the instructions at
    http://phpbb.openmediavault.or…58230e334a7a38e159a2569cf


    Then I enabled ssh using the web UI, and added my key
    both under ~/.ssh and over the web UI.


    I can log in via password, but not with the key:


    $ ssh -v localhost
    OpenSSH_6.0p1 Debian-4+deb7u2, OpenSSL 1.0.1e 11 Feb 2013
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug1: Connecting to localhost [::1] port 22.
    debug1: Connection established.
    debug1: identity file /home/hamish/.ssh/id_rsa type -1
    debug1: identity file /home/hamish/.ssh/id_rsa-cert type -1
    debug1: identity file /home/hamish/.ssh/id_dsa type 2
    debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
    debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
    debug1: identity file /home/hamish/.ssh/id_dsa-cert type -1
    debug1: identity file /home/hamish/.ssh/id_ecdsa type -1
    debug1: identity file /home/hamish/.ssh/id_ecdsa-cert type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-4+deb7u2
    debug1: match: OpenSSH_6.0p1 Debian-4+deb7u2 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2
    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: sending SSH2_MSG_KEX_ECDH_INIT
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    debug1: Server host key: RSA 92:1f:0b:04:2d:ef:f1:b8:01:25:8b:7f:98:71:d3:cf
    debug1: Host 'localhost' is known and matches the RSA host key.
    debug1: Found key in /home/hamish/.ssh/known_hosts:1
    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
    debug1: Next authentication method: publickey
    debug1: Offering DSA public key: /home/hamish/.ssh/id_dsa
    debug1: Authentications that can continue: publickey
    debug1: Trying private key: /home/hamish/.ssh/id_rsa
    debug1: Trying private key: /home/hamish/.ssh/id_ecdsa
    debug1: No more authentication methods to try.
    Permission denied (publickey).


    Any ideas?


    Thanks!


    Hamish Cunningham
    Professor of Computer Science, University of Sheffield, UK
    07920 765 455 http://twitter.com/@HCunninghamhamish@gate.ac.uk
    http://pi.gate.ac.ukhttp://hamish.gate.ac.ukhttp://gate.ac.uk

  • I have not yet tried it via the webgui, the feature was just implemented recently on my request, but i know that it works manually. I have yet to switch to the webgui solution (didnt had time).


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • thanks


    as far as I can see the /etc sshd config should allow key-based login, so adding the key via the webgui should be redundant... nevertheless it doesn't work


    best


    h

  • I tried splitting the AuthorizedKeysFile directive into one per file and restarting the service but that didn't work.


    I got it to work by adding my pub key to the ~/.ssh/authorized_keys file manually


    Sorry I couldn't debug it further; thanks for your help!


    Hamish

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!