ssh - permission denied (publickey)

  • Hi,


    This is my first post on this forum. Thanks to all for your contributions !


    I have installed omv4 on a HC2 (installed from the omv image on sourceforge) and I would try to connect to it by using SSH with a public key authentication. For that, I have followed this guide.


    The following SSH configuration were done

    • Disable the root login
    • Disable password authentication
    • Enable public key authentication (PKA)
    • Enable compression
    • Enable tunneling

    I created a new user (omvuser1) with both sudo and ssh group and I ran the following commands


    ssh-keygen -f ~/.ssh/sshacess/sshremote -t rsa


    ssh-keygen -e -f ~/.ssh/sshacess/sshremote.pub


    with a copy/paste the output to


    Access Right Management | Users | <USERNAME> | Edit | Public Keys


    My config file (~/.ssh/config) looks like

    Code
    Host omv.workgroup
    Hostname 192.168.1.168
    User omvuser1
    Compression yes
    Port 56236
    IdentityFile ~/.ssh/sshaccess/

    To connect via SSH, I use the command below


    ssh -p 56236 -i ~/.ssh/sshacess omvuser1@192.168.1.168


    Unfortunately, I have this message


    "Load key "/home/omvuser1/.ssh/sshacess": Is a directory
    omvuser1@192.168.1.168: Permission denied (publickey)."


    To debug, I used the command ssh -vvv -p 56236 -i ~/.ssh/sshacess omvuser1@192.168.1.168, the result is below:


    I hope someone could help me !
    Thanks in advance !


    Kind regards
    stblaise

  • Thanks for your quick response !


    After remove the trailing slash, IHave the same issue :


    "Load key "/home/stblaisedesk01/.ssh/sshacess": Is a directory
    stblaisedesk01@192.168.1.9: Permission denied (publickey)."


    :(

  • I had 2 issues:


    • the 1st on the rights of private key and public key files

    solved with the chmod 600 command on both files



    • the 2nd on the ~ /.ssh /config file with the IdentityFile parameter

    solved by changing its value with the path and name of the private key file

Jetzt mitmachen!

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