Shell command error 255
The problem
Hello, I got this error if i try to shutdown my repetier Server with ssh. In the addon "Advanced ssh & Web terminal" it works with the command.
What version of Home Assistant Core has the issue?
2024.9.1
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
No response
Link to integration documentation on our website
https://www.home-assistant.io/integrations/shell_command
Diagnostics information
No response
Example YAML snippet
shell_command:
shutdown_repetier: ssh -i /config/ssh_keys/id_rsa -o 'StrictHostKeyChecking=no' [email protected] 'sudo shutdown -h now'
Anything in the logs that might be useful for us?
`Logger: homeassistant.components.shell_command
Quelle: /usr/src/homeassistant/homeassistant/components/shell_command/__init__.py:129
Integration: Shell Command (Dokumentation, Probleme)
Erstmals aufgetreten: 21:34:21 (3 Vorkommnisse)
Zuletzt protokolliert: 22:02:08
Error running command: `ssh -i /config/ssh_keys/id_rsa -o 'StrictHostKeyChecking=no' [email protected] 'sudo shutdown -h now'`, return code: 255
NoneType: None`
Additional information
No response
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (shell_command) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of shell_command can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign shell_commandRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
shell_command documentation shell_command source (message by IssueLinks)
When you run the command manually, does sudo prompt you for a password?
I've run into this before where it would fail to ask for a password (because it's not an interactive terminal) and exit with a failure status.
No. Manually it works without problems
The same situation with my case. Do you have solution?
Unfortunately not, but it worked again last time
Thanks. I walkaround this problem using NodeRed :)