[RPI2/3] SSH keys not work

  • Hi,

    I'm trying to setup libreelec to use sshkeys but it is not working and I can't see what is wrong since no logs are available. It is always asking for password and if I disable the password login I can't login.
    Permissions are correct on authorized_keys and keys are correct as they work on other systems.
    Anyone has manage to use this feature?

    Edited once, last by fumantsu (October 15, 2016 at 8:32 PM).


  • I use it daily, before turning off password authentication make sure you can use the key login first

    copy ssh keys via

    Code
    ssh-copy-id root@<ip-address>

    Not working. It still asks for password. I have triple check the ssh-keys and all are ok and working on other systems


  • Of course ssh-copy-id will prompt for a password as it isn't able to connect because no keys are present.

    lol, probably you didn't understand. It copy the keys but didn't work.

    Thank linux god, systemctl is working and I found the issue. For some reason (which I believe is a bug) the /storage was owned by user 1000 (never exist) plus the permissions where 755 instead of 700 (since it is considering root home directory).
    Anyway logging should be better (at least it should be on tmpfs/ramfs)

  • lol, probably you didn't understand. It copy the keys but didn't work.

    Thank linux god, systemctl is working and I found the issue. For some reason (which I believe is a bug) the /storage was owned by user 1000 (never exist) plus the permissions where 755 instead of 700 (since it is considering root home directory).
    Anyway logging should be better (at least it should be on tmpfs/ramfs)


    There is no way that that can happen without user input ;)

  • lol, probably you didn't understand. It copy the keys but didn't work.

    Thank linux god, systemctl is working and I found the issue. For some reason (which I believe is a bug) the /storage was owned by user 1000 (never exist) plus the permissions where 755 instead of 700 (since it is considering root home directory).
    Anyway logging should be better (at least it should be on tmpfs/ramfs)

    I can confirm this bug: owner of /storage was id 1000 and the permission was 755. After fix owner and permission ssh without password works perfectly

  • I can confirm this bug: owner of /storage was id 1000 and the permission was 755. After fix owner and permission ssh without password works perfectly

    I can confirm also. New libreelec installed from noob, and just updated to 7.0.3. The /storage is being set as a "normal user", which doesn't exist, by the installation. Fix with: chown root:root /storage ; chmod 0700 /storage
    [hr]

    There is no way that that can happen without user input ;)

    Nope. That's how some installation come -- probably isn't seen because so few people use ssh & set their keys & fight with it after the fail.

    Edited once, last by ape (January 14, 2017 at 5:22 PM).