-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASUSWRT platform doesn't accept ssh login with password anymore #2343
Comments
There was commit (1381984#diff-41bc1d46d2c173881ec4cbc34ed9f472) which introduced support for public key authentication. Could be related...@mtreinish perhaps you can help here. |
So I just gave it a try and I wasn't able to reproduce any issues with 0.22 using password auth, it worked fine for me. If you look at the patch which added public key auth support the actual login code path is the same, assuming you don't have a pub_key entry in the configuration.yaml so I'm not sure that's the problem. That being said the specific error message in this case is coming from pexpect.pxssh directly: https://github.com/pexpect/pexpect/blob/master/pexpect/pxssh.py#L304-L310 when it gets the password prompt a second time on trying to login, pxssh assumes that's because of an incorrect password and raises an exception. |
Actually there are three login attemps, not just one like pxssh should do. Could this be a dependency problem... Log entries from the router: |
I am having the same problem, and do not believe it is a dependency problem. For me, changing line 141 from
to
fixes the problem, but I do not have public key yet set up to test whether it breaks public key. |
Oh, yep I see the bug now. It's the str() cast on https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/device_tracker/asuswrt.py#L87 I forgot python is weird and casts None to "None". You can change the if too, the only case where that'd break is if someone passed in their public key file path as "None". I can push a patch for that to fix it, @linjef unless you want to handle it since you found the issue. |
@mtreinish , please do push the patch for it; you're probably most set up for it right now :) |
This commit fixes an issue with the use of None in default values for the config get() calls in __init__() of AsusWrtDeviceScanner. These values are cast as strings and when a NoneType is cast it returns the string "None" this broke the check for the existence of these fields. This commit fixes the issue by changing the default value to be an empty string '' which will conform with the behavior expected by the ssh login code. Closes home-assistant#2343
This commit fixes an issue with the use of None in default values for the config get() calls in __init__() of AsusWrtDeviceScanner. These values are cast as strings and when a NoneType is cast it returns the string "None" this broke the check for the existence of these fields. This commit fixes the issue by changing the default value to be an empty string '' which will conform with the behavior expected by the ssh login code. Closes #2343
I know I'm nitpicking, but shouldn't |
Home Assistant release (
hass --version
):0.22.1
Python release (
python3 --version
):3.5.1
Component/platform:
device_tracker/asuswrt
Description of problem:
ASUSWRT platform doesn't accept ssh login with password anymore. Same configuration worked with version 0.21 fine. Also SSH login from command line with same credentials works fine.
Expected:
Problem-relevant
configuration.yaml
entries and steps to reproduce:Traceback (if applicable):
Additional info:
The text was updated successfully, but these errors were encountered: