Hi,
I tried to install Alpine Linux 3.21 from SD-Card on Pi5. The card was
prepared with Pi-Imager.
All seems to work fine, Pi is booting and because of DHCP-fix address I
could start SSH root@[ip-addr] but the hint I found very frequently in
internet search results – user root, no password – is no longer valid
for version 3.21.
Does anybody know which is the correct password for the installation?
I have guessed some passwords, but I was not very lucky with that.
Many thanks
Gerald
On Thu Jan 16, 2025 at 12:45 AM CET, Gerald Pechoc wrote:
> Hi,>> I tried to install Alpine Linux 3.21 from SD-Card on Pi5. The card was > prepared with Pi-Imager.> All seems to work fine, Pi is booting and because of DHCP-fix address I > could start SSH root@[ip-addr] but the hint I found very frequently in > internet search results – user root, no password – is no longer valid > for version 3.21.>> Does anybody know which is the correct password for the installation?> I have guessed some passwords, but I was not very lucky with that.
I'm pretty sure it's still having no password. Are you sure you're
connecting to the correct machine?
Can you maybe connect with a display to the rpi and troubleshoot
further?
>> Many thanks> Gerald
On Wed, Jan 15, 2025 at 7:01 PM fossdd <fossdd@pwned.life> wrote:
>> On Thu Jan 16, 2025 at 12:45 AM CET, Gerald Pechoc wrote:> >> > I tried to install Alpine Linux 3.21 from SD-Card on Pi5. The card was> > prepared with Pi-Imager.> > All seems to work fine, Pi is booting and because of DHCP-fix address I> > could start SSH root@[ip-addr] but the hint I found very frequently in> > internet search results – user root, no password – is no longer valid> > for version 3.21.> >> > Does anybody know which is the correct password for the installation?> > I have guessed some passwords, but I was not very lucky with that.>> I'm pretty sure it's still having no password. Are you sure you're> connecting to the correct machine?
Yeah, that's what the Alpine docs say, too:
<https://wiki.alpinelinux.org/wiki/Raspberry_Pi>.
> Can you maybe connect with a display to the rpi and troubleshoot> further?
I would run `setup-alpine` before troubleshooting. I suspect the empty
password may be the problem. Once a new user is setup with a password
or public key, then SSH should work fine.
Jeff
On 15/01/2025 23:45, Gerald Pechoc wrote:
> Hi,>> I tried to install Alpine Linux 3.21 from SD-Card on Pi5. The card was > prepared with Pi-Imager.> All seems to work fine, Pi is booting and because of DHCP-fix address > I could start SSH root@[ip-addr] but the hint I found very frequently > in internet search results – user root, no password – is no longer > valid for version 3.21.>
sshd wont allow root logins by default. go in on the console (where
empty root password should work fine) and then edit /etc/ssh/sshd_config
and uncomment the line "PermitRootLogin" and set it to "yes". Restart
sshd and now you should b able to loign. I havent yried this with no
root passwor,d but it works for having a normal root password set (so
maybe set one when you are in on the console as well, having gone to the
trouble of connecting a screen and keyboard)
cheers,
-pete.
Hi Gerald,
Do you intend to ssh connect on initial Alpine startup, before any prior
setup?
Unlike Pi OS, Alpine is not configured for this by default: you need to
set it up.
(ref: previous comments)
There's a pre-made apkovl file which can seamlessly do this for you:
https://github.com/macmpi/alpine-linux-headless-bootstrap
It does allow passwordless root login; may be secured with
authorized_keys too.
On Alpine 3.21 make sure you use latest 1.2.3 version for successful ssh
login.
On 16/1/25 09:45, Gerald Pechoc wrote:
> I tried to install Alpine Linux 3.21 from SD-Card on Pi5. The card was > prepared with Pi-Imager.> All seems to work fine, Pi is booting and because of DHCP-fix address I > could start SSH root@[ip-addr] but the hint I found very frequently in > internet search results – user root, no password – is no longer valid > for version 3.21.
Nor should it ever be valid. Password authentication on the `root`
account is a major security issue. Password authentication using an
empty password for the `root` account is asking for trouble.
0. Generate a SSH keypair (`ssh-keygen`) and have the public key handy
(it'll be a long string starting with "ssh-${ALGO}")
1. Create a non-root user with a non-empty password on the Pi if you
have not already done so. Ensure that the `~user.ssh` directory exists.
2. `scp /path/to/your/key.pub user@[ip-addr]:.ssh/authorized_keys`,
verify that you can log in using your SSH key using `ssh user@[ip-addr]`.
3. Log in as `root` on a console on the `pi`; then run these commands:
# mkdir /root/.ssh
# cp ~user/.ssh/authorized_keys /root/.ssh
# chown -R root:root /root/.ssh
# chmod 0600 /root/.ssh/*
Now, try logging in as `root@[ip-addr]`, you'll now be able to log-in
using public key authentication using your private key.
--
Stuart Longland (aka Redhatter, VK4MSL)
I haven't lost my mind...
...it's backed up on a tape somewhere.
I want to say “thanks” to all who answered to my question.
In the end, I solved the problem using the second port of my screen and
a free cable of a keyboard/mouse switch to start my first installation
of Alpine Linux. Now I have it running on a RasPi 3B+ and I am delighted
with this minimalistic system.
Only to find documentation is rather difficult.
But for my next problem, I make a new mail with appropriate subject line.
Gerald
On 16.01.25 01:00, fossdd wrote:
> On Thu Jan 16, 2025 at 12:45 AM CET, Gerald Pechoc wrote:>> Hi,>>>> I tried to install Alpine Linux 3.21 from SD-Card on Pi5. The card was>> prepared with Pi-Imager.>> All seems to work fine, Pi is booting and because of DHCP-fix address I>> could start SSH root@[ip-addr] but the hint I found very frequently in>> internet search results – user root, no password – is no longer valid>> for version 3.21.>>>> Does anybody know which is the correct password for the installation?>> I have guessed some passwords, but I was not very lucky with that.> > I'm pretty sure it's still having no password. Are you sure you're> connecting to the correct machine?> > Can you maybe connect with a display to the rpi and troubleshoot> further?> >>>> Many thanks>> Gerald>
--
....................................................................
Gerald Pechoc
Engineer for Telecommunications
and Electronics
aut.social/@kreativnix
gerald@pechoc.eu
+43 680 215 15 19