Posts by ktrieun

    The file /var/log/auth.log was empty so I checked the /var/log/auth.log.1 right after I unsuccessfully tried to SSH via public key and this is what came up

    Code
    Oct 14 06:24:58 openmediavault sshd[2895]: Invalid user kevinnguyen from 192.168.0.195 port 49562
    Oct 14 06:24:58 openmediavault sshd[2895]: input_userauth_request: invalid user kevinnguyen [preauth]
    Oct 14 06:24:58 openmediavault sshd[2895]: Connection closed by 192.168.0.195 port 49562 [preauth]
    Oct 14 06:25:01 openmediavault CRON[2897]: pam_unix(cron:session): session opened for user root by (uid=0)
    Oct 14 06:25:01 openmediavault CRON[2897]: pam_unix(cron:session): session closed for user root


    I also checked the permissions on both the keys and this is the results of ls -l on my .ssh folder

    Code
    total 48
    -rw-------@ 1 kevinnguyen staff 511 Oct 13 11:40 alt_id_rsa.pub
    -rw-r--r--@ 1 kevinnguyen staff 99 Oct 13 22:30 config
    -rw-------@ 1 kevinnguyen staff 511 Oct 13 11:16 id_RFC4716.pub
    -rw-------@ 1 kevinnguyen staff 1896 Sep 21 23:26 id_rsa
    -rw-------@ 1 kevinnguyen staff 420 Sep 21 23:26 id_rsa.pub
    -rw-r--r--@ 1 kevinnguyen staff 175 Oct 13 11:10 known_hosts

    Alright, so am I correct in thinking that I need to change the line to

    Code
    Host omv
    Hostname 192.168.0.247
    User KevinNguyen
    Compression yes
    port 22
    IdentityFile ~/.ssh/id_rsa


    in ~/.ssh/? Or am I changing it in in ~/etc/ssh/ssh_config?


    EDIT:
    So I changed it in both files and I'm still getting denied.



    EDIT 2:


    I'm not sure what you mean when you say I need a private key to authenticate. I have id_rsa in that folder and it should be my private key. Is there something that I missed in setup?

    I don't know if this will be useful, but here's the results of ls -l from the root directory



    I'm having issues getting SSH PKA to work on my OMV Server through my Macbook.
    I followed the steps outlined in these guides


    - [GUIDE] Enable SSH with Public Key Authentication (Securing remote webUI access to OMV)
    - OMV SSH Documentation


    And I'm still having issues. I've look at all the prior threads I can find and so far nothing has helped.
    These are some posts that I have gone through to try and solve my problem.
    - ssh - permission denied (publickey)
    - ssh: Permission denied (publickey, password)


    My user account is in the ssh group
    If I enable "keyboard-interactive authentication", I'm able to log in as both root and my user account.


    My user account through the webGUI has the RSA4716 SSH public key in there and it matches what is generated through the terminal on my computer.
    I logged in as root and went into the /var/lib/openmediavault/ssh/authorized_keys and it matches the file for my user account.


    I've tried changing the permissions on both the root directory of my OMV Server to be chmod 755 and both my public and private keys to chmod 600.


    This is my ~/.ssh/config file

    Code
    Host omv
    Hostname 192.168.0.247
    User KevinNguyen
    Compression yes
    port 22
    IdentityFile ~/.ssh/id_rsa.pub

    When I try to SSH into the server with "keyboard-interactive authentication" disabled, I get this log even when I type the IP address directly.


    I'm exhausted all my resources and still haven't found a solution elsewhere so I would really appreciate the help.