I have a strange problem and can’t find a fix. Maybe someone has an idea which points me in the right direction:
I have some Pi ZeroWs which sends commands over ssh. For example a Pi ZeroW with RFID-Reader. If it reads a badge, it send “access granted” over ssh.
The problem is now that i have a delay from about 10s(!) until the password prompt came up. The good thing is that i have two ZeroW. One works fine and the other not! Means on one device the prompt came up in let’s say 2s and on the other device it needs 10s. The server is always the same.
With this fact you may think it should be easy to find the problem. But believe me, its not easy!
I set up a new ZeroW with actual dietpi v8.24.1 which has also a delay of 10s. I also compared “ssh -vvv” which looks similar. I compared the modules but can’t find any differences.
It hangs on this message (ssh -vvv):
debug1: kex: algorithm: email@example.com
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: firstname.lastname@example.org MAC: compression: none
debug1: kex: client->server cipher: email@example.com MAC: compression: none
During this step, the CPU-Load goes up to 100%. And i think this is the problem why it took so long! (specially on the pi zero)
For me it looks like there is something like “hardware acceleration” missing for sha or something like that. But the module “sha256_generic” and “libsha256” is loaded. On the working device, i can not see such high cpu load during login.
I hope someone can point me in the right direction, because 10s delay is horrible for sending commands!
Some additional information to test this if you have a pi zerow:
SSH into your pi zerow and after successful login connect to another server on your network:
Look how long it took until the password prompt is shown.
I of course compared the versions of ssh, and the version number is the same.
Working: OpenSSH_9.2p1 Raspbian-2, OpenSSL 3.0.11 19 Sep 2023
Problem: OpenSSH_9.2p1 -2+deb12u1, OpenSSL 3.0.11 19 Sep 2023
So i copied the “ssh” from the working one to the non working and → YES!!! That was the problem!
So it looks like the “Raspbian-2” version has some “Hardware-Accelerration” or something like that in it which reduces cpu load and speed up the login process (and maybe more?).
But i can not understand why one device has this version and the other has not the same. Because both uses dietpi v8.24.1.
Is this a bug?