~alpine/users

6 6

Pi5 Installation v 3.21 from SD - need initial password for root (SSH)

Gerald Pechoc <gerald@pechoc.eu>
Details
Message ID
<d16bae36-1612-431a-b352-d8a7ef42c480@pechoc.eu>
DKIM signature
missing
Download raw message
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
Details
Message ID
<D7320PM9TEQE.OTBR7IAXD54V@pwned.life>
In-Reply-To
<d16bae36-1612-431a-b352-d8a7ef42c480@pechoc.eu> (view parent)
DKIM signature
missing
Download raw message
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
Jeffrey Walton <noloader@gmail.com>
Details
Message ID
<CAH8yC8mrsCmY1EdpOiCGjgmb1bL1BcQoriOuJKzBkSZq2gVRMA@mail.gmail.com>
In-Reply-To
<D7320PM9TEQE.OTBR7IAXD54V@pwned.life> (view parent)
DKIM signature
missing
Download raw message
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
Pete French <pete@twisted.org.uk>
Details
Message ID
<14ebe671-5c83-4ae5-b8ba-26724c434619@twisted.org.uk>
In-Reply-To
<d16bae36-1612-431a-b352-d8a7ef42c480@pechoc.eu> (view parent)
DKIM signature
missing
Download raw message
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.
Details
Message ID
<9c284b13-435d-4e8f-9ff2-0d979ab35938@ipik.org>
In-Reply-To
<D7320PM9TEQE.OTBR7IAXD54V@pwned.life> (view parent)
DKIM signature
missing
Download raw message
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.
Stuart Longland VK4MSL <me@vk4msl.com>
Details
Message ID
<510dcdfa-9c6e-441a-8490-691bf5047bb9@vk4msl.com>
In-Reply-To
<d16bae36-1612-431a-b352-d8a7ef42c480@pechoc.eu> (view parent)
DKIM signature
missing
Download raw message
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.
Gerald Pechoc <gerald@pechoc.eu>
Details
Message ID
<61779edc-04cc-44d6-a910-ee7b6b829be9@pechoc.eu>
In-Reply-To
<D7320PM9TEQE.OTBR7IAXD54V@pwned.life> (view parent)
DKIM signature
missing
Download raw message
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
Reply to thread Export thread (mbox)