Asuswrt asus merlin not working after firmware update

Hi,

Today found out my device tracker asuswrt was not working anymore. Found out quickly why as the last thing changed was the firmware on my router.

New firmware 384.5
change log tells:

- REMOVED: Telnet server. Please use SSH for console-based management.

Tried protocol: ssh but as this is default this was probably never going to be the solution.

found on:
https://asuswrt.lostrealm.ca/changelog-382 Edit: Dead link

addon/component page:

How can we make it work on SSH ?

logs:

Jul 30 20:05:25 Homeassistant hass[555]: #033[32m2018-07-30 20:05:25 INFO (Thread-13) [homeassistant.components.device_tracker.asuswrt] Checking Devices#033[0m
Jul 30 20:05:26 Homeassistant hass[555]: #033[31m2018-07-30 20:05:26 ERROR (Thread-13) [homeassistant.components.device_tracker.asuswrt] Unexpected SSH error: Could not establish connection to host#033[0m
Jul 30 20:05:26 Homeassistant hass[555]: #033[31m2018-07-30 20:05:26 ERROR (Thread-13) [homeassistant.components.device_tracker.asuswrt] Unexpected SSH error: Could not establish connection to host#033[0m
Jul 30 20:05:27 Homeassistant hass[555]: #033[31m2018-07-30 20:05:27 ERROR (Thread-13) [homeassistant.components.device_tracker.asuswrt] Unexpected SSH error: Could not establish connection to host#033[0m
Jul 30 20:05:27 Homeassistant hass[555]: #033[31m2018-07-30 20:05:27 ERROR (Thread-13) [homeassistant.components.device_tracker.asuswrt] Unexpected SSH error: Could not establish connection to host#033[0m

EDIT:
solution here:

You have to enable ssh in the router settings. This is possible only if your asus supports it.

Here is one example: https://www.htpcguides.com/enable-ssh-asus-routers-without-ssh-keys/

I use ssh on my merlin rt-68u. If you are using HA python, be sure to connect once in command line using the homeassistant account to validate the certificate.

Solution:

Fixed with the use of the private key. (password did not work)

run in to some issues which had to do with permissions:

(homeassistant_venv) homeassistant@Homeassistant:/home/pi$ ssh-keygen -f "/home/homeassistant/.ssh/known_hosts" -R 192.168.13.1
Host 192.168.13.1 not found in /home/homeassistant/.ssh/known_hosts
(homeassistant_venv) homeassistant@Homeassistant:/home/pi$ ssh -i /var/config/ssh/ssh_asus_private_key [email protected]
The authenticity of host '192.168.13.1 (192.168.13.1)' can't be established.
ECDSA key fingerprint is SHA256:aasdsadasdasdasdasdadasdasdasdasdasd.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.13.1' (ECDSA) to the list of known hosts.
Load key "/var/config/ssh/ssh_asus_private_key": Permission denied
Permission denied (publickey).
(homeassistant_venv) homeassistant@Homeassistant:/home/pi$ ssh -i /home/homeassistant/.homeassistant/ssh_asus_private_key [email protected]
Warning: Identity file /home/homeassistant/.homeassistant/ssh_asus_private_key not accessible: No such file or directory.
Permission denied (publickey).
(homeassistant_venv) homeassistant@Homeassistant:/home/pi$ ssh -i /home/homeassistant/.homeassistant/ssh/ssh_asus_private_key [email protected]
Load key "/home/homeassistant/.homeassistant/ssh/ssh_asus_private_key": Permission denied
Permission denied (publickey).
(homeassistant_venv) homeassistant@Homeassistant:/home/pi$ ssh -i /home/homeassistant/.homeassistant/ssh/ssh_asus_private_key [email protected]

solved by changing the permissions this way
sudo chown homeassistant:homeassistant ssh_asus_private_key

(start of the fix used wtih the help of the reply of Emphyrio from the shared post above. )

steps:

The AsusWRT device tracker was working for me, but only using SSH with password or Telnet (Telnet is no longer supported in recent router firmware). This is how I got it working using a SSH public/private key pair:

Download & open PuttyGen.

Generate a public/private key pair. Click menu Conversions > Export OpenSSH key. Save the (private) key file to the hassio /config/ssh folder (you’ll need to create the ssh subfolder yourself). Make sure it has no file extension. E.g. ssh_asus_private_key.

In your Asus router control panel, navigate to Administration > System. Set these options:
asus_ssh_settings

From PuttyGen, copy the generated Public Key and paste it in the field for SSH Authentication Key in Asus control panel. It should start with ‘ssh-rsa’ on the first line. Apply & reboot the router.

Edit your configuration.yaml as described in the docs, e.g. like this:

device_tracker:
  - platform: asuswrt
    host: <yourAsusRouterIPaddress>
    username: <yourAsusRouterUsername>
    ssh_key: /config/ssh/ssh_asus_private_key
Using Putty, open an SSH connection to your Hassio. Execute this command:
chmod 600 /config/ssh/ssh_asus_private_key
These steps are working with Hassio v0.65.5 and Asuswrt-Merlin 380.69.
Edit: just upgraded to Asuswrt-Merlin 384.4 and can confirm the asuswrt tracker is still functioning using SSH. Using both password & key pair.

I’m trying to use this component for the first time, but can’t get it to work on my Netgear R7000 with XWRT (Asus Merlin) firmware 384.6.

I tried using the password method and the SSH key method. Both do not work for me after trying the suggestions in this thread.
My router logs show that a connection attempt is being made, but something with the auth is going wrong:

Aug 11 21:58:35 dropbear[651]: Child connection from 192.168.1.88:50300
Aug 11 21:58:35 dropbear[651]: Exit before auth: Exited normally

Im using HA in docker on my Synology. Might that have something to do with it?

Using putty with the generated key, can you login to your router? That will validate the setup on the router side.