6

Using LibreELEC like a pro—management via SSH

 2 years ago
source link: https://www.jeffgeerling.com/blog/2022/using-libreelec-pro-management-ssh
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Using LibreELEC like a pro—management via SSH

June 1, 2022

For a recent project, I needed to install LibreELEC/Kodi on a Raspberry Pi Compute Module 4 with built-in eMMC storage.

Because it's inconvenient to be swapping the Pi around from the embedded display I was using it in to my preferred carrier board I use for flashing Pis and interacting with their filesystems, I wanted to manage my LibreELEC install over SSH.

It seems like whatever documentation the LibreELEC Wiki used to have for remote SSH access is missing, and all I could find were vague references to enabling SSH during a GUI setup wizard. I don't remember seeing that.

But after many, many searches, I surmised it was possible to enable SSH by adding ssh to the end of the line in the system's cmdline.txt file, and rebooting. So I pulled the Pi, used usbboot to mount the fat32 volume on my Mac, and opened cmdline.txt and added ssh. Then I popped the Pi back in the embedded display, and started it up.

Sure enough, I could now SSH in:

SSH into LibreELEC

The default user is root and the default password is libreelec. No wonder they don't have SSH enabled by default :P

Now, another thing I wanted to do was enable USB so I could plug a keyboard or flash drive into my embedded display. The CM4 doesn't enable the built-in USB 2.0 ports by default—or at least it didn't, historically.

But if I tried editing the /flash/config.txt file, it said it wasn't editable. Apparently the /flash directory is mounted read-only at boot, so I had to remount it as read-write.

Once I did that, I added dtoverlay=dwc2,dr_mode=host to enable USB 2.0 at the end of the /flash/config.txt file, and rebooted (reboot).

It's probably a good idea to change the default SSH password (passwd while logged in as root) while you're in there.

SSH can be useful for a number of things. Remote management, config backups, uploading/downloading files, and remote rebooting of your LibreELEC box, to name a few.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK