# Cannot use SSH key from WAN

**URL:** <https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267>\
**Category:** Installing and Using OpenWrt\
**Created:** [November 15, 2020, 12:25am UTC](https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267 "2020-11-15T00:25:54Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![lleachii](https://forum.openwrt.org/letter_avatar/lleachii/32/6_449c533f586939b6e5f246632a46421f.png) [@lleachii](https://forum.openwrt.org/u/lleachii)\
**Post date:** [November 15, 2020, 12:25am UTC](https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267/1 "2020-11-15T00:25:54Z")

</div>

- I made a SSH key
- I disabled password for login
- It works on LAN
- Works on all other interfaces I can test

I get this from WAN:

```
Sat Nov 14 23:57:54 2020 authpriv.info dropbear[2683]: Child connection from xxx.xxx.xxx.xxx:33870
Sat Nov 14 23:57:55 2020 authpriv.info dropbear[2683]: Exit before auth from <xxx.xxx.xxx.xxx:33870>: Exited normally

```

😕 ❓

---

<div class="post-metadata">

**Author:** ![trendy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trendy/32/8800_2.png) [@trendy](https://forum.openwrt.org/u/trendy)\
**Post date:** [November 15, 2020, 12:54am UTC](https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267/2 "2020-11-15T00:54:42Z")

</div>

`uci export dropbear` ?

---

<div class="post-metadata">

**Author:** ![lleachii](https://forum.openwrt.org/letter_avatar/lleachii/32/6_449c533f586939b6e5f246632a46421f.png) [@lleachii](https://forum.openwrt.org/u/lleachii)\
**Post date:** [November 15, 2020, 1:05am UTC](https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267/3 "2020-11-15T01:05:32Z")

</div>

```
package dropbear

config dropbear
        option PasswordAuth 'on'
        option Port '22'
        option RootPasswordAuth 'off'
        option GatewayPorts 'on'

```

---

<div class="post-metadata">

**Author:** ![trendy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trendy/32/8800_2.png) [@trendy](https://forum.openwrt.org/u/trendy)\
**Post date:** [November 15, 2020, 1:15am UTC](https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267/4 "2020-11-15T01:15:14Z")

</div>

Your config is working fine on my router.  
Check if the client has the correct key, if it's sending the correct user.

---

<div class="post-metadata">

**Author:** ![lleachii](https://forum.openwrt.org/letter_avatar/lleachii/32/6_449c533f586939b6e5f246632a46421f.png) [@lleachii](https://forum.openwrt.org/u/lleachii)\
**Post date:** [November 15, 2020, 11:37am UTC](https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267/5 "2020-11-15T11:37:36Z")

</div>

> [@trendy](#):
>
> Check if the client has the correct key, if it's sending the correct user.

So after a lot of testing...it seems it's the app...

- I used another device from WAN... **works!**
- I edited the working entry to use the WAN address... **it worked!** 😄
- I deleted both entries and set them up again... **neither worked!** ☹

So...anyone know a **good** SSH client for Android? 😆

Also, web searching:

> <https://github.com/connectbot/connectbot/issues/844>
>
> I upgraded my router to OpenWrt 19.07.03 that includes Dropbear v2019.78
> Tested… with connectbot 1.9.6 and with build 1.9.7-31 on Android 9, both resulted in the same output
> 
> \`\`\`
> Key exchange was not finished, connection is closed.
> Cannot negotiate, proposals do not match.
> \`\`\`
> 
> On dropbear side I get:
> 
> \`authpriv.info dropbear\[8624\]: Exit before auth: No matching algo hostkey
> \`
> 
> Works fine with OpenWrt 18.06.08 which uses Dropbear v2017.75

I personally get this error:

> The server hostkey was not accepted by the verifier callback.  
> Unknown key type rsa-sha2-256

---

<div class="post-metadata">

**Author:** ![eduperez](https://forum.openwrt.org/user_avatar/forum.openwrt.org/eduperez/32/2066_2.png) [@eduperez](https://forum.openwrt.org/u/eduperez)\
**Post date:** [November 15, 2020, 11:53am UTC](https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267/6 "2020-11-15T11:53:55Z")

</div>

I'm currently using JuiceSSH, and it works with OpenWrt.

---

<div class="post-metadata">

**Author:** ![lleachii](https://forum.openwrt.org/letter_avatar/lleachii/32/6_449c533f586939b6e5f246632a46421f.png) [@lleachii](https://forum.openwrt.org/u/lleachii)\
**Post date:** [November 15, 2020, 12:27pm UTC](https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267/7 "2020-11-15T12:27:13Z")

</div>

> [@eduperez](#):
>
> I'm currently using JuiceSSH

> [@lleachii](#):
>
> I made a SSH key

So, you use the **paid** version, correct?  
It seems that importing keys is a US $4.99 feature... 😆

Interesting... 🤔

(I'm trying to remember why I switched from JuiceSSH to connectbot in the past...)

---

<div class="post-metadata">

**Author:** ![eduperez](https://forum.openwrt.org/user_avatar/forum.openwrt.org/eduperez/32/2066_2.png) [@eduperez](https://forum.openwrt.org/u/eduperez)\
**Post date:** [November 15, 2020, 1:35pm UTC](https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267/8 "2020-11-15T13:35:44Z")

</div>

No, i haven't paid a dime, and I use my keys to connect (password logins are disabled on WAN)...

---

<div class="post-metadata">

**Author:** ![bluewavenet](https://forum.openwrt.org/user_avatar/forum.openwrt.org/bluewavenet/32/4330_2.png) [@bluewavenet](https://forum.openwrt.org/u/bluewavenet)\
**Post date:** [November 15, 2020, 2:25pm UTC](https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267/9 "2020-11-15T14:25:04Z")

</div>

I use Admin Hands.  
ssh and sftp amongst others. Works well and is free with a limited number of defined hosts. Unlimited hosts on the paid version, never needed it though, I just delete the least used to add a new one if needed.

---

<div class="post-metadata">

**Author:** ![lleachii](https://forum.openwrt.org/letter_avatar/lleachii/32/6_449c533f586939b6e5f246632a46421f.png) [@lleachii](https://forum.openwrt.org/u/lleachii)\
**Post date:** [November 15, 2020, 2:49pm UTC](https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267/10 "2020-11-15T14:49:30Z")

</div>

> [@bluewavenet](#):
>
> I use Admin Hands.  
> ssh and sftp amongst others. Works well and is free

Thanks, I love the look...seem moving apps closes all sessions...then I wondered...how do I do SSH Tunnels... 🤔

> [@eduperez](#):
>
> No, i haven't paid a dime, and I use my keys

Aaah! I misread the columns on the "Learn more about pro features" button...I'll check it out...

Oh...I do read that SSH Tunnels is paid tho...oh well! 😄

> [@bluewavenet](#):
>
> Unlimited hosts on the paid version, never needed it though, I just delete the least used to add a new one if needed.

> [@lleachii](#):
>
> - I edited the working entry to use the WAN address... **it worked!** 😄
> - I deleted both entries and set them up again... **neither worked!** ☹

I also have some entries that appear to work. Hopefully they fix this SHA2-256 thing with an update to connectbot.

---

<div class="post-metadata">

**Author:** ![system](https://forum.openwrt.org/uploads/default/original/3X/7/4/740520c71f00039bbf001045c682f0ecb25e905a.png) [@system](https://forum.openwrt.org/u/system)\
**Post date:** [November 25, 2020, 2:49pm UTC](https://forum.openwrt.org/t/cannot-use-ssh-key-from-wan/79267/11 "2020-11-25T14:49:33Z")

</div>

Closed on November 25, 2020, 2:49pm UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
