SSH login with password disabled on PI which previously worked

What is the problem?

There was a time, I could remotely e.g. from a Mac login via shh using user "pi".
This is now disabled which can be identified as per shh -vv option
It says the SSH-agent is running and denies Password auth.

What did you already try to solve it?

tried to find an optin in OctoPrint, tried to solve via CMD PLUGIN

Have you tried running in safe mode?

no - I do not believe this changes the SSH setting

Did running in safe mode solve the problem?

not tested see above - pls correct me if I am wrong

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

octoprint-systeminfo-20241216114626.zip (72.9 KB)

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

Version 1.10.3
Printer PRUSA I3 MK3S
Mac OS 15.1.1 Sequoia
Raspberry 4
Browser Mozilla FF 133.0.3 (64-Bit)

SSH is an OS (OctoPi) protocol, so OctoPrint has nothing to do with it. You could ask for help in other forums. Identify the Raspberry Pi OS as "Raspbian GNU/Linux 10 (buster)" or "Debian 10 (buster)".

The SSH daemon (sshd) is configured with the file /etc/ssh/sshd_config so you will need some method to gain access to that file. Either a keyboard and monitor (HDMI) attached to the Raspberry Pi or a USB / microSD adapter and the ability to mount ext4 partitions on your Mac.

Another option would be to use the USB / microSD adapter on the RPi and a second microSD card. Flash a new copy of OctoPi (or any other distro) and then boot from that, place your existing microSD card in the USB adapter, mount the old root partition, and access the file(s) from there.

Let us know which option you select, and we can proceed from there.

Another option would be to use the OctoPrint web interface and create a backup file. Download this backup file to your Mac and then start over with a fresh OctoPi image (I would use a new microSD card as well). Unless you have a lot of "other" files / applications installed on your existing copy of OctoPi, this would be the cleanest approach (and will be needed soon as OctoPrint support for the Python version (3.7.3) on OctoPi 0.18 will go away soon).

@b-morgan Hi,
the start from scratch was in my mind as well already.
My concern was, that as I did not change anything re ssh config etc. and therefore I was / am afraid that maybe OctoXXX Releases might bring changed config files later again and access would be away again.

So going down the "from-scratch" route shall be sustainable rather than a routinely to be repeated option.

I furthermore hoped that my case is not a single case and there would be a plugin that repairs or helps to repair it.
This is why I asked for help as I did not find anything,
so probably the other day, I am going to start from scratch.

In the meantime, I will as well spend some time on your initial proposal:
" ... you will need some method to gain access to that file ( /etc/ssh/sshd_config ) ... "

I'll then post here on the chosen way.

thx so far

While I don't have multiple 3D printers, I do have multiple Raspberry Pi as well as a few alternate SBC and I have installed multiple OctoPi versions. I can assure you that SSH configurations on all those systems defaults to allow access via username and password.

Without some detailed analysis of the SSH config file, why your setup changed behavior is a mystery. The file system on microSD cards has been known to get corrupted particularly when the RPi is power cycled without a proper shutdown.

1 Like

Linux raspoctopi 5.10.63-v7l+ #1496 SMP Wed Dec 1 15:58:56 GMT 2021 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Mar 31 14:40:04 2022 from xxx.yyy.zzz.41

So ... I enabled my mac to mount ext4, edited /etc/ssh/sshd_config and connected via SSH.

so DONE.

@b-morgan
yes, why the config file change .. no Idea.
I am sure, I will remember this journey.
Thank you for your advices, they did bring me on track.

Hint: I will try to figure out, how to get sudo PW-free on the machine ( PI ) as then the CMD plugin can help the one or the other thing.
Here it failed as there was no permission to edit sshd_config using the plugin from the OctoPrint UI.