SSHCommand icon indicating copy to clipboard operation
SSHCommand copied to clipboard

Unable to SSH hate to Pi

Open oneseventhree opened this issue 8 months ago • 3 comments
trafficstars

Hi,

I am unsure why I can't get this to work:

sequence:
  - action: ssh_command.exec_command
    metadata: {}
    data:
      command: sudo reboot
      host: 192.168.1.189
      port: 8090
      user: xxx
      pass: xxx
alias: HyperHDR - Shutdown

I've also tried: command: reboot with no success.

It works when I do it through terminal(mac): Image

What am I doing wrong?

Also, I've added this into config.yaml:

# SSH - HyperHDR
ssh_command:
  host: 192.168.1.189
  port: 8090
  user: !secret hyperhdr_username
  pass: !secret hyperhdr_password

How do I use this in the script?

Thanks in advance!

oneseventhree avatar Feb 28 '25 23:02 oneseventhree

sudo requires a password. You can't enter it through this component.

AlexxIT avatar Mar 01 '25 16:03 AlexxIT

sudo requires a password. You can't enter it through this component.

Thanks for the reply 😁 is there another way to turn off a Pi without sudo?

oneseventhree avatar Mar 01 '25 22:03 oneseventhree

I think you can allow your user to run shutdown without sudo. Check docs in the Google.

AlexxIT avatar Mar 02 '25 09:03 AlexxIT