Hello. I found an issue on line 49 where the command does not include an option to run a command with sudo privileges. I modified your init.py script in HomeAssistant and verified this works. I can do a formal merge request if you'd like:
# If sudo is in the command, pass the password to execute
if 'sudo' in command:
_, stdout, stderr = client.exec_command(f'echo {password} | sudo -S {command}')
password = '**redacted**' # Redacting password for the response
else:
_, stdout, stderr = client.exec_command(command)
I was trying to perform a 'sudo shutdown -h now' or 'sudo apt update' and noticed this failed but I knew I was successfully logging in.
Hello. I found an issue on line 49 where the command does not include an option to run a command with sudo privileges. I modified your init.py script in HomeAssistant and verified this works. I can do a formal merge request if you'd like:
I was trying to perform a 'sudo shutdown -h now' or 'sudo apt update' and noticed this failed but I knew I was successfully logging in.