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.

    • Squizzy@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      20 hours ago

      Im not a slop fan but asking le chat for direction is just doing for me what google used to. It is helpful, it is also damaging to the communities that initally asked and aswered the questions though

  • tom@jlai.lu
    link
    fedilink
    arrow-up
    0
    ·
    3 days ago

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

  • LeFantome@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    3 days ago

    Why do you say that it “seems to work”?

    If it is no longer visible on the network, are you sure it is still booting successfully?

  • PlusMinus@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 days ago

    Did you commit your changes? Alpine for Raspi installed in diskless mode by default and is immutable.lbu cmmit

  • bob@feddit.uk
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 days ago

    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

    I’d stick to Raspbian if you’re struggling.

  • tvcvt@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    3 days ago

    That bit about the pi not being visible in the network after reboot makes me wonder if this is more of a networking issue rather than an ssh one.

    The pi zero is WiFi-only, right? Can you confirm that it’s getting on the WiFi network successfully? If so, maybe it’s getting a different IP than it initially did via DHCP.

    • eta@feddit.orgOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 days ago

      I solved it now. The problem was that during the setup-alpine script I didn’t set up the wlan0 interface since I thought that it already was set up because I was already connected.

    • LeFantome@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      3 days ago

      I have never used dropbear but, if it is promoting for a password, doesn’t that mean the system has connected over the network successfully?