I am using GPG to create a key pair on macOS 10.12.6 and am testing of Duplicity for secure backups.When I run the following command, I get the following error:duplicity /Users/me/testdir scp://user@123.456.789.000//home/user/directory/BackendException: could not load ~/.ssh/known_hosts, maybe corrupt?As far as I can tell, it's trying to load my local known_hosts file, for which the permissions are -rw-------, which I believe is correct.If I run the command as sudo I get:gpg: WARNING: unsafe ownership on homedir '/Users/me/.gnupg'Again, permissions appear correct:drwx------Edit: @B Layer suggested possible duplicate question, here's why it think it's not. The permissions on my home folder itself (ls -l /Users for macOS) are:drwxr-xr-x+This is consistent with the top answer provided in the suggested duplicate question, which states: the following permissions on $HOME will be sufficient for SSH to work.rwx------rwxr-x---rwxr-xr-xTherefore my permissions are correct according to the other question's answer. The contents of that folder, in particular the apparent problem file known_hosts has permissions of 600, consistent with this guide (step 3).Edit: To re-iterate the first part of the question:the error states that ~/.ssh/known_hosts could not be loaded and is possibly corrupt. The permissions on that directory are -rw------- and it is owned by the user running the command, therefore there should be no permissions issues accessing the contents of the directory(?)Edit: In the meantime I have moved ~/.ssh to ~/.ssh_old, recreated ~/.ssh and created new ssh keys. This should, I had hoped, have fixed the permissions issue. It has not. Could it be the issue is not directly with known_hosts?I also uninstalled and reinstalled Duplicity and checked the Duplicity process from a different user to the same remote server. All works, suggesting the server and Duplicity install are not at fault.On request of @xhienne, I ran this command:ls -ld ~; ls -la ~/.sshI got the following output (note some permissions in .ssh are no longer 600 but 644, since they were rebuilt by ssh-keygen):drwxr-xr-x+ 27 me  staff  918 Aug 11 20:17 /Users/metotal 40drwx------   7 me  staff   238 Aug 11 19:36 .drwxr-xr-x+ 27 me  staff   918 Aug 11 20:17 ..-rw-------   1 me  staff   403 Aug 11 19:36 authorized_keys-rw-r--r--   1 me  staff    93 Aug 11 19:10 config-rw-------   1 me  staff  1675 Aug 11 19:03 id_rsa-rw-r--r--   1 me  staff   413 Aug 11 19:03 id_rsa.pub-rw-r--r--   1 me  staff   397 Aug 11 19:04 known_hostsSo somewhere there's a problem with my ssh on that user, but it's not in ~/.ssh/known_hosts as that's been rebuilt.
GPG: corrupt SSH and unsafe ownership
ssh;permissions;gpg