Strange issue with SSH on Libreelec 11

  • Hi all,

    I am testing Libreelec 11 on an old S905X box (Zen 11 pro) and I installed it in a new separate micro SD card.

    Libreelec starts and boots up, everything is fine except for the wireless but I am not bothered about that as I am able to use the LAN instead.

    However, when I try to enable SSH on the first setup wizard, save the configuration and check the config again to set up the password, it goes back to Off.
    I changed the SSH password, enabled SSH again, and yet it's still Off.

    I added "ssh" to the uEnv.in file but, while I can ping the IP address from my laptop, I always get a connection refused on port 22, like if the service is unable to run.

    I am out of ideas, any suggestions on what to try next? Is this a known issue? Thanks!

  • Try

    ssh-keygen -R IP.of.the.device

    I guess you connected to the same device before via ssh?

    I am getting a connection refused as opposed to ssh issues in connecting to the box itself.
    But it was still a good point to check and no, I haven't used ssh with that IP before:

    ````

    ssh-keygen -R 192.168.1.X

    Host 192.168.1.X not found in /Users/X/.ssh/known_hosts

  • Would have been too easy. Sorry I can‘t help further I‘m afraid. Good luck

    No worries, it was a good shout! The issue is puzzling me. I think I will try to attach a keyboard and run it in textmode to see if I can see the ssh daemon running and, if not, try to start one manually (I am excluding a local firewall issue). Unless there are other things I can check!

  • So this seems to be a bug to me but I wanted to confirm with you before I raise one (and I find the instructions to do so).

    I enabled textmode, nosplash and removed quiet, to watch the boot.

    This is what I was presented with (sorry for the dusty micro-screen, all I had to work with a keyboard):

    Basically, sshd was trying to restart all the times.

    I checked the journal and there was a no such file or directory error while attempting to create the SSH keys:

    Checking the folders, ssh folder was missing under /storage/.cache:

    I created the folder, restarted ssh and it seems to be fine so far:

    Is that a known issue? If not, how do I report it?
    Thanks!

  • I'm struggling to recall seeing that kind of issue before so I'd chalk it up to something random on your box (or SD card). If it was a proper bug in the OS we'd expect to see a large number of user reports. Odd.. /shrug

  • Maybe there isn't much people using S905X with the latest version, but that is me speculating at this point! You know better for sure.

    I used BalenaEtcher to write the image the SD card and, truth is, I am testing various *Elec distributions and Armbian, but I had the SSH issue only with this one.

    Is the ssh folder already created in the image file or is it created at the first runtime? Is there a way to expand/mount the image to inspect it? This is what I used: LibreELEC-AMLGX.arm-11.0.3-box.img.gz

  • You can use the LE USB/SD app to create the image, or Win32DiskImager, or other similar apps. You can experiment with another SD card. If it's some kind of repeating issue when you use a different app and/or card then it's something massively obscure but local to your specific box. Active install stats for the project show me that there are enough people using the AMLGX image and/or with S905X devices to know it's not a general issue with the image.

  • Thanks for the feedback chewitt, I appreciate it. I am planning to install this image in another microSD, so I will report back if I can still reproduce the issue, in case someone has the same problem.

  • Should be automatically created by tmpfiles at boot. Please post logs if this occurs again (accessible via samba share without ssh)

    Interesting. The /storage/.ssh and /var/empty directories which are included in the same file do exists without any manual intervention from my side. I am planning to flash other microSD soon.

  • mglae I flashed another microsd, set up the uenv.ini file as follows:`

    Code
    dtb_name=/dtb/meson-gxl-s905x-p212.dtb
    bootargs=boot=UUID=1507-4017 disk=UUID=f426ba96-ae14-42f3-8d9f-269a100f407b quiet nosplash ssh systemd.debug_shell=ttyAML0 console=ttyAML0,115200n8 console=tty0

    And I can reproduce the problem.

    However, if I add "textmode" to bootargs after writing the microsd, ssh is able to start.
    I also used a diverse laptop (windows) and LibreELEC USB-SD Creator this time.

    I enabled Samba but that doesn't seem to work either, so unable to extract the logs.
    I am kind of accepting that is a problem with my box at this point :(

    Edited once, last by r4w (September 24, 2023 at 5:19 PM).