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.
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?