Asuswrt SSH login failing

I have been using device tracking via my asus router for some time with no problems, until today when I upgraded my router firmware. Nothing else was changed, and looking at the release notes it appears there was some fixes to the routers methods of handling the chacha cryptos… not sure if that broke it? Here’s the router logs I’m seeing:

Jun 30 12:56:22 RT-AC86U dropbear[6763]: Exit before auth from <192.168.YEAHYEAH:59492>: No matching algo hostkey

…and in HA logs

2020-06-30 12:37:15 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 60, in async_setup_legacy
    hass, {DOMAIN: self.config}
  File "/usr/src/homeassistant/homeassistant/components/asuswrt/device_tracker.py", line 13, in async_get_scanner
    scanner = AsusWrtDeviceScanner(hass.data[DATA_ASUSWRT])
KeyError: 'asuswrt'

…and my config:

# Device Tracking
asuswrt:
  host: !secret my_router_ip
  username: !secret my_router_username
  password: !secret my_router_password

device_tracker:
  - platform: asuswrt
    host: !secret my_router_ip
    username: !secret my_router_username
    password: !secret my_router_password
    interval_seconds: 30
    consider_home: 180
    new_device_defaults:
      track_new_devices: false
      

I did read across an article mentioning some older cryptos were being deprecated in the newer releases of openssl. Does HA use SHA1 by default for ssh or something? Not sure if I just need to remove the config, reboot, then readd, or if I have to force my router to allow older cryptos, or what. Any tips/advice to get this fixed would be great.

Hi Truglodite,

I have exactly the same problem here! Running an Asus a68u, MerlinWRT (a custom firmware). Firmware 384.17 no problems, with SSH key or using password. When I upgraded to 384.18 I ran into the exact same problem. I did a factory reset on the router, still problems. After downgrading to .17 its back to working again.

The weird thing is, I tried to manually SSH into the router using terminal and that works perfectly fine, no error.

This has to be either something in the ASUS firmware, but since the ssh is working when using the computer I think maybe something has to get updated on the Home-Assistant side of things.

If more people have this issue we might be able to file a bug report?

Same here on Merlin 384.18. I can manually SSH into router without password from HA instance but HA is failing when using the integration.

Agreed, I am also having no issues ssh’ing in from my pc, using the same exact user/pw, or using ssl cert. I forgot to mention, yes I’m also using Merlin wrt. Not sure if this is related, but I did notice openssl was updated in the latest firmware:

Again not sure if this is relevant, but this is why I asked if HA is trying to use SHA1 for ssh to the router.

Happy to hear I’m not the only one! ill report an issue on GitHub and add this topic so the developers can reach us if they need some more information on the matter

Edit: Added the GitHub links so you guys can follow:

2 Likes

Awesome, this is fresh so let’s get more tentacles on it… here’s a thread I started @snb:

I noted on the github issue that I’m having intermittent activity from my device tracker (seems it is occasionally able to see my phone for a second before disconnecting). I need this fixed before tonight, otherwise I’ll have to disable device tracking to avoid hearing random voice prompts “Welcome back home” lol.

Same problem here.

RT-AC68U with newest MerlinWRT firmware 384.18.

Hello the same here

RT-AC88U with Merlin 384.18.

the firmware 384.17 was working perfectly.

Anyone who is experiencing this issue, can’t live without their asuswrt based automations until it is fixed, and want to revert back to 0.17, please observe this c/v from the 384.18 release notes:

  - NOTE: A number of changes for some models are not backward
          compatible with previous versions.  Downgrading to
          a previous release will require a factory default reset
          afterward in many cases.

I successfully downgraded my ac86u from .18 to .17 without factory reset, and I’m having no issues. I did this AFTER a full backup of my router settings, jffs, & thumb drive. I guess most of you all are running scripts like freshjr, skynet, and diversion like I am… so this is important to do in case a factory reset is required.

Hello,
I have installed stock firmware 3.0.0.4.385.20630 (for AC88U) and the thing works again
my config file

asuswrt:
host: 192.168.0.1
username: art
ssh_key: /config/ssh/ssh_key

[/wrap]Merlin 384.18 seems to have broken AsusWRT presence. Was working fine with .17

Hello, still the problem there or now it works fine with 384.18? Thanks

I haven’t seen it in the HA release notes yet. So guessing it isn’t fixed yet. If anyone finds the fix is ready, please post here to help those who are waiting.

It’s pretty easy to patch in the meantime. I think the new package is already in dev, but if you want it working now, do the following

docker exec -it home-assistant /bin/bash  #(replace 'home-assistant' with your container name)
pip install aioasuswrt==1.2.7
vi /usr/src/homeassistant/homeassistant/components/asuswrt/manifest.json

change the package from 1.2.6 to 1.2.7 in manifest.json

After that, restart the container, and you’ll be good until the image is updated again. (presumably with asuswrt 1.2.7 included)

Genius! :slight_smile:
Confirmed working with the above patch!

Thank you!

Hey guys, how can that manipulation be executed if HA is on VM (Virtualbox)?
I am on 384.18 and AsusWRT integration doesn’t work, but I’d better patch HA rather than revert back to an old FW.

I’m pretty sure aioasuswrt 1.2.7 is in HA v0.113 (although I don’t see it in any changelogs). I’m currently on HA v0.113.1, have not applied the patch and my asuswrt integration appears to be working.

It is in 0.113, and of course 0.113.1 as well. I was watching the issue and waiting for the fix to come out. As soon as it arrived in 113, I upgraded both my router and HA, and haven’t had any problems since.

On a sort of OT and sort of related note, after upgrading HA to 0.113, my mjpeg cameras (via blue iris configs) stopped working. I had to actually add in the user/pass for blue iris to get them working, where as before just adding ^ before a client IP in blue iris worked. I’m guessing it has to do with some changes to the way TLS auths are handled in HA now.