xxnumbxx Posted May 10, 2022 Share Posted May 10, 2022 (edited) I have two servers one running 6.9.2 and my backup server is on 6.10-rc7. When attempting to connect from the backup server to my primary, I get the below error. When doing the inverse everything works correctly and no errors reported. I have tried deleting the .ssh folder from the flash/configs and recreating the connection but the problem persists. Also tried resetting permissions, still a no go. Any idea what causes this? It does seem to allow the connection I just don't like errors. Thanks in advance for any help. root@XXXXXX:~# ssh 10.10.1.2 Enter passphrase for key '/root/.ssh/id_ed25519': hostfile_replace_entries: link /root/.ssh/known_hosts to /root/.ssh/known_hosts.old: Operation not permitted update_known_hosts: hostfile_replace_entries failed for /root/.ssh/known_hosts: Operation not permitted Edited May 10, 2022 by xxnumbxx spelling Quote Link to comment
JorgeB Posted May 11, 2022 Share Posted May 11, 2022 I think I remember seeing the same thing when connecting from a server running an older release, but since it still worked didn't though much about it, it should go away once you update the backup server. Quote Link to comment
JorgeB Posted May 15, 2022 Share Posted May 15, 2022 Turns out this can also occur between two servers running v6.10-rc, so lets see if someone has an idea on what's causing this, or you can create a bug report. Quote Link to comment
jmztaylor Posted May 15, 2022 Share Posted May 15, 2022 In the interim it might be possible to bypass that if you are confident of no man in the middle attacks and bypass the host key check using: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null Not sure if it will work in this exact scenario. 1 Quote Link to comment
Stromol Posted June 1, 2022 Share Posted June 1, 2022 I have this same problem since updating to 6.10.2. I have two unraid servers both on 6.10.2 If I SSH in from one to the other I get the error "hostfile_replace_entries: link /root/.ssh/known_hosts to /root/.ssh/known_hosts.old: Operation not permitted update_known_hosts: hostfile_replace_entries failed for /root/.ssh/known_hosts: Operation not permitted". It does proceed to log me in though. I tried clearing the known host file and it did then update the file despite the message. The other oddity is it only does it in one direction. If I SSH in form the other server it works fine. I can see no difference between the file permissions. The only other difference I can think of is that on one server I updated regularly through the 6.10 beta releases and on the other I went from 6.9 straigh to the stable release of 6,10. I see that this was reported with OpenSSH but it was patched some while ago Quote Link to comment
zer0.de Posted June 5, 2022 Share Posted June 5, 2022 Hi, first Post and an than a solution if any one have this error like me: update_known_hosts: hostfile_replace_entries failed for /root/.ssh/known_hosts: Operation not permitted I found this work for me: ssh-keyscan -H TARGET_HOST >> ~/.ssh/known_hosts on both systems and the error is gone. 8 5 Quote Link to comment
JorgeB Posted June 5, 2022 Share Posted June 5, 2022 27 minutes ago, zer0.de said: I found this work for me: Thanks, also worked for me. 1 Quote Link to comment
Stromol Posted June 5, 2022 Share Posted June 5, 2022 Thank you. It worked for me! Quote Link to comment
tmchow Posted July 5, 2022 Share Posted July 5, 2022 On 6/5/2022 at 4:37 AM, zer0.de said: Hi, first Post and an than a solution if any one have this error like me: update_known_hosts: hostfile_replace_entries failed for /root/.ssh/known_hosts: Operation not permitted I found this work for me: ssh-keyscan -H TARGET_HOST >> ~/.ssh/known_hosts on both systems and the error is gone. I was having this error when SSH'ing into a non-unraid box too. This `ssh-keyscan` command also resolved the issue for me. Thanks! Quote Link to comment
Bd2e Posted July 20, 2022 Share Posted July 20, 2022 On 6/5/2022 at 12:37 PM, zer0.de said: ssh-keyscan -H TARGET_HOST >> ~/.ssh/known_hosts Worked for me too 6.10.3 so thank you. Quote Link to comment
tmchow Posted January 8, 2023 Share Posted January 8, 2023 On 6/5/2022 at 4:37 AM, zer0.de said: I found this work for me: ssh-keyscan -H TARGET_HOST >> ~/.ssh/known_hosts on both systems and the error is gone. Thank you! this worked for me too. Quote Link to comment
adminmat Posted January 8, 2023 Share Posted January 8, 2023 (edited) I'm SSHing to a remote Raspian OS server over Wireguard. I'm getting theses same errors when Rsync'ing to the remote server. Do I need to replace any of the command test? I tried this command replacing the TARGET_HOST part with the SSH address of my other server. i.e. [email protected] but I get this output in unRAID's CLI: getaddrinfo [email protected]: Name or service not known getaddrinfo [email protected]: Name or service not known getaddrinfo [email protected]: Name or service not known getaddrinfo [email protected]: Name or service not known getaddrinfo [email protected]: Name or service not known Any ideas? Edited January 8, 2023 by adminmat Quote Link to comment
JorgeB Posted January 9, 2023 Share Posted January 9, 2023 6 hours ago, adminmat said: Any ideas? Use only the target IP address. Quote Link to comment
adminmat Posted January 9, 2023 Share Posted January 9, 2023 Ok I had to first delete the contents from the /root/.ssh/known_keyhosts file. Then after running the command above I'm no longer getting the errors. Thanks. Quote Link to comment
Vatoe Posted April 11 Share Posted April 11 Still helping to this date with the fix! On 6/5/2022 at 9:37 PM, zer0.de said: Hi, first Post and an than a solution if any one have this error like me: update_known_hosts: hostfile_replace_entries failed for /root/.ssh/known_hosts: Operation not permitted I found this work for me: ssh-keyscan -H TARGET_HOST >> ~/.ssh/known_hosts on both systems and the error is gone. Still helping to this day. Thanks! Quote Link to comment
boernie77 Posted September 19 Share Posted September 19 Hi, i also have this error. I run the ssh-keygen on the firs server without problems. But my second server has not the standard port. I tried ssh-keyscan -H 192.168.2.120:2001 >> ~/.ssh/known_hosts but this doesn´t work. How can i run ssh-keyscan with a server on an other port? Thanks! Quote Link to comment
Zack3000 Posted 5 hours ago Share Posted 5 hours ago In my case, the command also didn't solve the issue. A look into the known_hosts file revealed that the IP (not the port) was written in square brackets. After I removed those, it worked. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.