Headless install

Oct 17, 2022 Last reply: 3 years ago 21 Replies

I found all the bits (Pi3B, PoE splitter, USB caddy, SATA spinner, SD card) to cobble together my low power always-on "server" to allow me to turn off the power-hungry server when it's not specifically required.



Used the latest RPi Imager, chose PiOS Lite, told it to enable SSH, set a username and password, wrote the image, insert SD card, no keyboard/HDMI connected, plug into ethernet, powers and boots.



Find the DHCP addr from my router, using PuTTY I can SSH to the machine, give it the username and password I set earlier, but it just says "Access Denied", wipe and repeat in case I fumbled setting the password, same problem.



What's the point of setting SSH credentials that it won't let you use?



What do you mean set a username and password

From my old and failing memory you just touch a file named ssh in the boot folder, when burning the SD card. The username/password is just the Pi OS default username: pi, password: raspberry.

Have you tried this default username/password?

Perhaps, but also not keeping up with new developments. The RPi Imager program can do it all for you. Also the username is not necessarily pi anymore. The app works for me, but I only used it to set up pubkey access, not username/password.

While re-reading the docs recently, I noticed that they've decided that this is too insecure and say "pi:raspberry" is no longer supported in the current images. You have to set up your own username/password combination now, one way or other (I think the docs do describe a manual way that doesn't use the imager program).

The latest Pi Imager has an advanced config dialog, that includes SSH settings

formatting link

Yes, that also gives "Access Denied"

Any chance of setting up a serial console? That should let you interrupt boot and fall into single user as root. Never had to do it on RasPiOS, but it's routine with FreeBSD.

hth,

bob prohaska

Le 17/10/22 à 20:26, Andy Burns a écrit :

Did you at least create user / password? In recent version of OS there is no more user pi.

Oh, I can hook it up to monitor and keyboard for long enough to get SSH login working, but it just felt from the installer options that I shouldn't need to.

I did, at the point of writing the SD card.

I was hoping to avoid the temporary spaghetti of hooking up keyboard and monitor, simply to set a password on the console at first boot, and then unplug it to use by SSH after that.

Yes, apologies all, I appear to be out of date.

My newest SD card fs has a create date Apr 2021, which I assume was the date I last did a headless installation.

I must have done upgrades to get to the current distributions.

And having hooked up a screen+keyboard, it won't accept the username+password that way either ... no possibility of uk/us keystroke confusion.

Guess I'll do another fresh install without touching the "advanced" dialogue in Pi Imager

There has been an issue with a recent upgrade to OpenSSH that it doesn't support some of the ciphers previously used (deprecated as they're no longer secure). That meant mixes of old and new clients, servers and old SSH keys don't talk any more.

If you enable logging, PuTTY should tell you if it failed to negotiate key exchange successfully. It is possible a newer OpenSSH server on the Pi doesn't share any supported ciphers with an older PuTTY client.

At least for OpenSSH client, you can force it to downgrade to an older cipher for talking to old servers, but ideally you would upgrade PuTTY instead.

Theo

What are the contents of /etc/shadow and /etc/passwd with respect to the usernames you thought should actually work?

Assuming you can read the basic non-boot partition on the pi SD card...

Sounds like something I need, but there's a problem: I notice that the RPi Foundation appears to be only only making it available for Ubuntu. However I don't get on with Ubuntu (no, I don't like the Gnome desktop either) because I've been a RedHat used since Redhat 6.2 was released in the late '90s and have used Fedora since version 1 appeared just after 2001.

So, is there either a Fedora version of the Pi Imager? Either an RPM package or a distro-agnostic download, e.g. a gzipped version, would be fine.

Doing that worked, it forced me to create a new user with password on first boot, and then I had to enable SSH with raspi-config, afterwards putty was happy to logon.

will have to dig another SD card out to have a look.

Windows would see the vfat(?) partition and moan about the ext one.

I couldn't see anything within cmdline.txt or config.txt that seemed to be there to enable SSH or create my user.

Yes, arm-image-installer:

formatting link
that doesn't say anything about headless mode.

Also, Pi Imager is not PiOS specific - it'll flash other OSes, but it might not do the customisation steps. I don't know what it does for Fedora.

Theo

Can you not install a different desktop on Ubuntu? In fact isn't there a minimal Ubuntu install for the Pi to which you can add Xfce or whatever you fancy. You don't have to have Gnome with Ubuntu!

Just to be clear: I want to install the standard Debian-based Pi-OS on an RPi 2, but doing so from a laptop running the XCFE spin of Fedora 36.

However, the link you supplied seems to assume that I will want to install a Fedora ARM image on an RPi using a (modified?) version of the Pi Imager. So questions:

- is the arm-image-installer OS-agnostic? IOW if I run

$sudo dnf install -y arm-image-installer

and then pull down the appropriate Debian Pi-OS image for my RPi 2 the arm-image-installer I downloaded from the Fedora package library, it should happily apply the headless tweaks and login and then install the modified image on my RPi.

Sorry about the pedantry, but neither the RaspberryPi nor the Fedora documentation is clear about this.

Indeed - my non-Pi systems are all on the XFCE version of Fedora 36. I have no wish to run Debian derivatives any place except on a RaspberryPi.

I gave up on Gnome when Gnome v 2.3 was released in an incomplete state and then replaced without warning by Gnome 3 which I hated just as much as the contemporary Windows version (required at work). At that point I switched my own systems over to the Fedora XFCE spin and have never looked back.

did you run raspi-config to enable ssh ?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required