home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.81k stars 30.9k forks source link

unifi_direct fails to connect #74657

Closed siyuan-nz closed 2 years ago

siyuan-nz commented 2 years ago

The problem

unifi_direct fails to connect to the Unifi AP over ssh because the updated ssh client no longer accepts ssh-rsa and ssh-dss. Since for years Ubiquiti fails to update dropbear with support for newer key algorithms, the only workaround I can find is by changing self.ssh = pxssh.pxssh() to self.ssh = pxssh.pxssh(options={"HostKeyAlgorithms": "ssh-rsa"}) in device_tracker.py

What version of Home Assistant Core has the issue?

2022.7.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Ubiquiti UniFi AP

Link to integration documentation on our website

https://www.home-assistant.io/integrations/unifi_direct/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

unifi_direct documentation unifi_direct source (message by IssueLinks)

frenck commented 2 years ago

The suggested change sounds good to me, feel free to open a PR to adjust it 👍

../Frenck

COCottonwood commented 2 years ago

Could this be related to PR# #74551 - "Python 3.10 ssl cipher defaults in HA 2022.7.0 break the Elk M1 integration"?

siyuan-nz commented 2 years ago

I don't think that's related, if you attempt to ssh from HA to the UniFi AP, you'd see the following error:

$ ssh ubnt@unifi.home.lan
Unable to negotiate with 192.168.9.2 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss