#I’m keen for a fools errand time to try
1 messages · Page 1 of 1 (latest)
buh-bow
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```
Excellent
Now you're making progress
What is the password prompt?
From SSH? From sudo?
from ssh
I literally just copied it from the remote host
i've renamed it though, does that matter?
No, but ... do you know what you're doing with SSH key pairs?
kind of?
You added the public key to the authorised keys on the remote host?
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.
Google found me https://linuxhint.com/ssh-authorized-keys-example-usage/, but there's plenty of other guides
Basically append the public key file to the .ssh/authorized_keys file
so I copy the contents of id_rsa.pub from my remote host, and append that to .ssh/authorized_keys in home assistant?
No
ah I think I see what you mean!

on the remote host

so I'm appending the remote hosts own id_rsa.pub to its own authorized_keys file
Yes, that's how it knows that the corresponding private key is authorised for SSH
right
do I need to do anything after I do that? Like restart sshd on the remote host?
No
Because I'm still getting error 255 after doing that
Just because you changed one thing doesn't mean that the basic test steps change
Change one thing, see if it works, repeat
ok different error now
I'm getting a warning about an unprotected private key file
but still seeing an ssh prompt for my password
Ok, so fix that
