#I’m keen for a fools errand time to try

1 messages · Page 1 of 1 (latest)

remote grove
#

Ha yeah I’ve followed this before

#

I’m probably just making some stupid mistake

remote grove
#

buh-bow

remote grove
#
  turn_off_vmhost: ssh -i /config/ssh/id_rsa_vmhost -o StrictHostKeyChecking=accept-new andrew@vmhost.33h.lan sudo /sbin/shutdown +5
  turn_off_vmhost2: ssh -i /config/ssh/id_rsa_vmhost2 -o StrictHostKeyChecking=accept-new andrew@vmhost2.33h.svc sudo /sbin/shutdown +5```
torn flare
#

Images of text... how nauseated

#
  1. Does the command work from an SSH session to HA
remote grove
#

soz

#

nope

#

asks me for a password

torn flare
#

Excellent

#

Now you're making progress

#

What is the password prompt?

#

From SSH? From sudo?

remote grove
#

from ssh

torn flare
#

Then your key isn't being accepted on the remote host

#

Fix that 😉

remote grove
#

I literally just copied it from the remote host

#

i've renamed it though, does that matter?

torn flare
#

No, but ... do you know what you're doing with SSH key pairs?

remote grove
#

kind of?

torn flare
#

You added the public key to the authorised keys on the remote host?

remote grove
#

how do I do that?

#

I may not have done that step. I read it in your instructions and I was scratching my head at it.

torn flare
#

Basically append the public key file to the .ssh/authorized_keys file

remote grove
#

so I copy the contents of id_rsa.pub from my remote host, and append that to .ssh/authorized_keys in home assistant?

torn flare
#

No

remote grove
#

ah I think I see what you mean!

torn flare
remote grove
#

on the remote host

torn flare
remote grove
#

so I'm appending the remote hosts own id_rsa.pub to its own authorized_keys file

torn flare
#

Yes, that's how it knows that the corresponding private key is authorised for SSH

remote grove
#

right

#

do I need to do anything after I do that? Like restart sshd on the remote host?

torn flare
#

No

remote grove
#

Because I'm still getting error 255 after doing that

torn flare
#

Just because you changed one thing doesn't mean that the basic test steps change

#

Change one thing, see if it works, repeat

remote grove
#

ok different error now

#

I'm getting a warning about an unprotected private key file

#

but still seeing an ssh prompt for my password

torn flare
#

Ok, so fix that

remote grove
#

holy shit

#

that did it