SSH errors - Operation not permitted when attempting to ssh into another unraid server.


Recommended Posts

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 by xxnumbxx
spelling
Link to comment
  • 3 weeks later...

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

 

Link to comment

Hi,
first Post and an than a solution :D

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.

 

  • Like 8
  • Thanks 4
Link to comment
  • 5 weeks later...
On 6/5/2022 at 4:37 AM, zer0.de said:

Hi,
first Post and an than a solution :D

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!

Link to comment
  • 2 weeks later...
  • 5 months later...

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 by adminmat
Link to comment
  • 1 year later...

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 :D

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!

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.