# Can't connect via SSH after replacing Dropbear with OpenSSH

**URL:** https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386
**Category:** Troubleshooting
**Created:** [21 September 2022 06:14 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386 "2022-09-21T06:14:42Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![loheiman](https://dietpi.com/forum/user_avatar/dietpi.com/loheiman/32/2662_2.png) [@loheiman](https://dietpi.com/forum/u/loheiman)
#### Post date: [21 September 2022 06:14 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/1 "2022-09-21T06:14:42Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [21 September 2022 06:30 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/2 "2022-09-21T06:30:34Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 September 2022 06:49 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/3 "2022-09-21T06:49:41Z")

</div>

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

---

<div class="post-metadata">

### Author: ![toby555551](https://dietpi.com/forum/user_avatar/dietpi.com/toby555551/32/2705_2.png) [@toby555551](https://dietpi.com/forum/u/toby555551)
#### Post date: [27 September 2022 13:41 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/4 "2022-09-27T13:41:50Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [27 September 2022 14:52 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/5 "2022-09-27T14:52:35Z")

</div>

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?

```auto
journalctl -u ssh.service

```

---

<div class="post-metadata">

### Author: ![loheiman](https://dietpi.com/forum/user_avatar/dietpi.com/loheiman/32/2662_2.png) [@loheiman](https://dietpi.com/forum/u/loheiman)
#### Post date: [9 November 2022 03:28 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/6 "2022-11-09T03:28:26Z")

</div>

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

---

<div class="post-metadata">

### Author: ![loheiman](https://dietpi.com/forum/user_avatar/dietpi.com/loheiman/32/2662_2.png) [@loheiman](https://dietpi.com/forum/u/loheiman)
#### Post date: [9 November 2022 03:30 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/7 "2022-11-09T03:30:48Z")

</div>

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"

---

<div class="post-metadata">

### Author: ![loheiman](https://dietpi.com/forum/user_avatar/dietpi.com/loheiman/32/2662_2.png) [@loheiman](https://dietpi.com/forum/u/loheiman)
#### Post date: [9 November 2022 03:36 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/8 "2022-11-09T03:36:03Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![loheiman](https://dietpi.com/forum/user_avatar/dietpi.com/loheiman/32/2662_2.png) [@loheiman](https://dietpi.com/forum/u/loheiman)
#### Post date: [9 November 2022 03:38 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/9 "2022-11-09T03:38:28Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![loheiman](https://dietpi.com/forum/user_avatar/dietpi.com/loheiman/32/2662_2.png) [@loheiman](https://dietpi.com/forum/u/loheiman)
#### Post date: [9 November 2022 05:53 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/10 "2022-11-09T05:53:54Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [9 November 2022 09:32 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/11 "2022-11-09T09:32:08Z")

</div>

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

---

<div class="post-metadata">

### Author: ![rrsalas](https://dietpi.com/forum/user_avatar/dietpi.com/rrsalas/32/3048_2.png) [@rrsalas](https://dietpi.com/forum/u/rrsalas)
#### Post date: [27 November 2022 22:21 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/12 "2022-11-27T22:21:39Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [28 November 2022 16:25 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/13 "2022-11-28T16:25:46Z")

</div>

> [@rrsalas](#):
>
> I can confirm that this is the issue

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

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [28 November 2022 16:59 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/14 "2022-11-28T16:59:42Z")

</div>

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:

```nohighlight
# 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.

---

<div class="post-metadata">

### Author: ![fow0ryl](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/f/df788c/32.png) [@fow0ryl](https://dietpi.com/forum/u/fow0ryl)
#### Post date: [30 November 2022 07:52 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/15 "2022-11-30T07:52:34Z")

</div>

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 …

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [1 December 2022 09:03 UTC](https://dietpi.com/forum/t/cant-connect-via-ssh-after-replacing-dropbear-with-openssh/14386/16 "2022-12-01T09:03:15Z")

</div>

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.
