ikifar2012 / remote-backup-addon

Automatically create and backup HA snapshots using SCP
30 stars 4 forks source link

Known_hosts Question #82

Closed SirGoodenough closed 1 year ago

SirGoodenough commented 1 year ago

Any idea how to clear this warning. I've always seen it but it still works. I thought sending it all to a new server might fix it, it doesn't. I had a server fail so had to reset everything. I think that it is looking for this file on the HA host maybe. Does this on both of my HA systems. Nothing broke, but annoying.

s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[06:18:19] INFO: Adding SSH configuration.
[06:18:19] WARNING: Missing known_hosts file! Retrieving public key of remote host 10.10.100.10.
# 10.10.100.10:22 SSH-2.0-OpenSSH_8.4p1 Debian-5+deb11u1
[06:18:20] INFO: Creating local backup with password.
[06:18:20] INFO: Creating partial backup: "ChaloupkaAbode_backup 2022-12-11 06-18"
[06:18:20] NOTICE: Excluded folder(s):
media
patman15 commented 1 year ago

Please see the tab "Documentation", you need to create a known_hosts file.

SirGoodenough commented 1 year ago

I didn't see reference to this in the Docs anywhere.
I'm guessing that because Addon is using /ssl (Like the other addons) insteat of the Linux default /,ssh that things are weird. Going with my Gut I googled it and found ssh-keyscan and that looks like it works.

➜  /config git:(master) ✗ cd ../ssl
➜  /ssl  ssh-keygen -f ./[PICK_A_UNIQUE]_ecdsa -t ecdsa -b 521   
answer the questions...
➜  /ssl ssh-copy-id -f -i [SAME_UNIQUE]_ecdsa [LOGIN]@[YOUR IP HERE]
➜  /ssl ssh-keyscan -M [YOUR IP HERE] >> ./known_hosts

Referencing that and these article links would be helpful in here: https://addons.mathesonsteplock.ca/docs/addons/remote-backup/resources

https://www.ssh.com/academy/ssh/keygen https://www.ssh.com/academy/ssh/copy-id https://www.techrepublic.com/article/how-to-easily-add-an-ssh-fingerprint-to-your-knownhosts-file-in-linux/

It's gone now...

s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[12:02:47] INFO: Adding SSH configuration.
[12:02:48] INFO: Creating local backup with password.
[12:02:48] INFO: Creating partial backup: "ChaloupkaAbode_backup 2022-12-12 12-02"
[12:02:48] NOTICE: Excluded folder(s):
media
patman15 commented 1 year ago

Did you take a look here? Bildschirmfoto vom 2022-12-12 19-19-53

Yes, you are right, it should be referenced in the documentation as well. Will try to fix that.

SirGoodenough commented 1 year ago

When you said documentation, I looked there, not in the addon top blurb. Missed that one completely.

patman15 commented 1 year ago

Hmm, I just saw that I had already an PR #42 which was merged and the file is there. For some reason it does not show up in the documentation. @ikifar2012 can you fix that? Did I miss something?

SirGoodenough commented 1 year ago

42 is supposed to be the answer to everything somehow...

Still I suggest adding those links in the helpful would have been helpful to me.

I didn's see reference to this in the Docs anywhere. Going with my Gut I googled it and found ssh-keyscan and ran this in a terminal window on HA Host.

➜  /config git:(master) ✗ cd ../ssl
➜  /ssl  ssh-keygen -f ./[PICK_A_UNIQUE]_ecdsa -t ecdsa -b 521   
answer the questions...
➜  /ssl ssh-copy-id -f -i [SAME_UNIQUE]_ecdsa [LOGIN]@[YOUR IP HERE]
➜  /ssl ssh-keyscan -M [YOUR IP HERE] >> ./known_hosts

Got that from here so referencing these article links would be helpful. https://www.ssh.com/academy/ssh/keygen https://www.ssh.com/academy/ssh/copy-id https://www.techrepublic.com/article/how-to-easily-add-an-ssh-fingerprint-to-your-knownhosts-file-in-linux/

oops, had an edit and forgot to push enter...

ikifar2012 commented 1 year ago

@SirGoodenough I just fixed the issue, the documentation page was not linked in the sidebar 🤦‍♂️... It should be fixed now, let me know if that appears for you now