Getting an “Operation not permitted” error when running commands after to SSHing from another machine to macOS
Solution 1:
Try add sshd-keygen-wrapper
in the Security & Privacy -> Privacy -> Full Disk Access
I encountered the same and solved by above.