to connect to Home Assistant via port 22222 to troubleshoot my OS issue (above 5.2 not working on my pi4 ssd boot)
I used the putty gen software and am confused about the file created. I have copied the public key into notpad ++ with Ansi, unix settings. After coping there is not a (LF) at the end of the key. Should there be. Also is anything needed at the start of the key. I get to the screen with the login and I hit enter (not sure if this is correct as the directions in the docs do not say. After hitting enter I get Server refused our key, no supported authentication methods available. If you have used this maybe you can give me some insight on what I am doing wrong.
So why are you using /config/unifissh in the command then? You called the file unifissh.ppk. Also you need two files, a private and public key. And the public key has to be in the same folder with the same name except .pub on the end.
Also you skipped all the instructions above about the known hosts file. Without that its still not going to work even after you get the keys right.
I would suggest giving the below community guide a read as it goes through all these details. Including ways to test directly from the commandline without needing to restart HA between every test.
You aren’t telling it the key to use for authentication with -i so its using normal interactive authentication and asking for a password. You said you had a .ssh folder and named the key .ssh.pub right? So should be this then:
Sorry wait I’m being dumb, you need to provide the path to the private key file. The public key needs to be in the same folder with the same name except .pub on the end. Assuming you did that and your private key is at /config/.ssh change the command to this:
That command doesn’t permanently move your known hosts file, there’s no way to do that. It is an argument so it tells the SSH command that this one time it should look for the known_hosts file in this spot instead of the normal spot. You have to include that argument each time for every SSH command you run.
Looks good although just be aware we were putting /config/.ssh/known_hosts before and you put /config/known_hosts there. Either one works you just have to run it once manually via the command line to get it set up and then keep using the same exact location for the known hosts file in each shell command and command line sensor after that.