Unable to determine home directory for remote user

For me I kept the SSH key in the default folder (user/AppData/Roaming/Unreal Engine/UnrealBuildTool/SSHKeys/remoteaddress/user) and ensured the permissions were set properly on it

Open the RemoteToolChainPrivate.key properties, go to security tab, edit permissions, delete ALL users in there, and then add one user named “USERS” and set permissions to full control. Then close that and try building