Can't connect via SSH after replacing Dropbear with OpenSSH

Had been connecting fine with the default SSH client using root@ and a customized password. After replacing Dropbear with OpenSSH using dietpi-software, the same credentials no longer work and result in “permission denied, please try again” error. I’ve tried many other default credentials too but none work.

1 Like

Did you try to login with the dietpi user instead, so you have access for debugging?

Also please add some information about your system as asked in the template you got when starting the post.

Maybe, on client side the know host file would need to be updated as the SSH server fingerprint changed.

I have the same problem. I switched from Dropbear to openSSH via dietpi-software and now I can’t login via ssh with root. However I can ssh into the system using “dietpi” and then su into root. A bit annoying but that’s a workaround.

welcome to our community @toby555551

what exactly is your error message? What SSH clients you are using? Could you share logs after a failed login attamed?

journalctl -u ssh.service

yes i tried logging with user dietpi password diet pi and permission denied.

I’m using Command Prompt on windows. Error is “Permission denied, please try again.”

Running journalctl -u ssh.service results in an error " 'journalctl is not recognized as an internal or external command, operable program or batch"

I’m not really sure how to get information like dietpi, kernel, distro version without SSH access. Can someone advise? The model is a B+, powered by an Anker 5V power supply, Samsung 32GB Class U1 Evo microsd card.

Can you elaborate and explain like I’m five? You SSH’d in using user dietpi password dietpi? That doesn’t work for me either.

Okay fixed the issue. Connected the Pi to a monitor/mouse and reinstalled Dropear (uninstalling OpenSSH). Rebooted and regained access via ssh with both the root and dietpi username.

Hmm, as if root password login wasn’t enabled for OpenSSH. I’ll have a look into this.

I can confirm that this is the issue. This happened to me.

What exactly you confirm? Installing OpenSSH will not allow access?

It works here without issues. If SOFTWARE_DISABLE_SSH_PASSWORD_LOGINS in /boot/dietpi.txt is not explicitly set to 1 or root (it defaults to 0, also for invalid values), this file is created:

# cat /etc/ssh/sshd_config.d/dietpi.conf
# Added by DietPi:
PasswordAuthentication yes
PermitRootLogin yes

Thus root password logins are enabled. Please verify this file exists in your case as well, and that there is no other (custom) file in /etc/ssh/sshd_config.d overriding these settings.

Just a remark.
I have replaced Dropbear with OpenSSH a few days ago on my NEO4 and my R1 via dietpi-software. Testet with 8.10 and 8.11 versions. Works on both SBC without any problems.
The only difference that catch my eyes: I’m using manjaro-linux instead af windows.

So maybe its a client problem?

And I remember that OpenSSH requirements changed some time ago. After upgrading some ssh servers I was unable to log in from a windows machine too. Updating putty solved the problem …

1 Like

Thanks for your feedback. We won’t know what the issue was without checking the OpenSSH config of affected users. Since it worked well with dietpi user, I still think it’s the but default denied root user password login, where either die to dietpi.txt setting or some failure the override config did not apply. But good idea to test with a different SSH client as well.