So I am experimenting with running a Pi Zero 2w with Alpine Linux as a headless server on my home network and so far I’ve succeeded in flashing the sd card and connecting via ssh via the documentation for setup on raspberry pis and the documentation for headless setup. But after I run “setup-alpine” and reboot I can’t get access via ssh since I get “Permission denied” after entering the password trying to log into root or a user account.

So far I’ve had a look at setting “PermitRootLogin” in /etc/sshd/sshd_config to “yes” and that seems to work, however after a reboot the pi is somehow not visible anymore over the network. I also asked AI and it said that by default Alpine uses dropbear for ssh instead of openssh and the latter could be more strict when it comes to permissions. I’m not so familiar with the workings of ssh so it may just be me doing something wrong or forgetting something during the so I’m asking if anyone here has is familiar with the process or has an idea.

Edit: I solved it by actually setting up the wlan0 interface with the network name and password during the “setup-alpine” this time and now it works. Before I thought that this was not necessary since I was already connected to the Pi via Wifi but apparently during install the wpa_supplicant.conf and the already working interface is not saved and after a reboot the wlan0 interface is therefore not enabled anymore.

For documentation: I set up the sd card with Raspberry Pi Imager selecting Alpine Linux in there. Then I copied the headless apkovl file from the git repo and wpa_supplicant to the root directory of the sd card and booted up the pi. After that I logged into root via ssh and ran “setup-alpine”, configuring the wlan0 interface and using the mmcblk0 disk for a sys installation.

Also not that after the reboot and when using openssh you can’t log in as root with a password since that is not allowed. You have to set up a user account.

  • tom@jlai.lu
    link
    fedilink
    arrow-up
    2
    ·
    1 day ago

    setup-alpine script should let you choose between dropbear and openssh