Unable to determine home directory for remote user


I’m getting this error when i’m trying to build for iOS. “Unable to determine home directory for remote user”
I am using a Windows and i have the SSH set up to a Mac … it connects but it cant find the home directory for some strange reason.
I checked with putty and the home directory is exactly where i land when i log in.

Any ideas?

I have same error and as I understand command “echo ~” is not executed correctly, but what should I do?

Do you have any non-ASCII characters (like ü ö ä and such) in one of your paths by any chance?

No, I have only latin symbols on Windows and Mac

Same issue. Tried on two different Macs, with two different OS’ (Mojave and High Sierra) on two different networks (local and internet) and it’s the same for both. I had different issues with remote build before on 4.17 so I tried upgrading to 4.21 and it moved pass the errors reported in 4.17, yet it got stuck with the home directory issue.

Stranger still, the log reports issues “at UnrealBuildTool.RemoteMac…ctor(FileReference ProjectFile) in D:…” and one another file in the same root but I have no drive D:\ in my system, so it’s really hard to guess what’s going on here.

Same issue here, doing ssh manually and entering “echo ~” works fine and displays the correct home directory to the console, but within unreal I get exactly this error (Win10 → Mac OS Mojave)

Same issue here :S

Same here, Windows 10 → Mojave using UE 4.21 … is there any way to make them notice the bug?

I have the same issue.
also with 4.21

is it all on Mojave 10.14.1 or 10.14.2 ? getting the same in 4.21, tried building from 4.20 and getting permissions error on the ssh key, it’s described on the forums, but the fix doesn’t work.
Found an answer that states it works if you revert to 10.14.0 an there is an issue with later Mojave, unfortunately not a possibility for me.

I found something.

Copy the private key from:
“C:\Users\matth\AppData\Roaming\Unreal Engine\UnrealBuildTool\SSHKeys\\matthias\RemoteToolChainPrivate.key”
into your projects directory.
Next point the “override existing SSH permissions file” to the RemoteToolChainPrivate.key you just copied.

This solved the issue for me! Just copying the generated SSH key into the content folder of the project worked perfectly!
Thank you so much!

I’ve also noticed two things that need to be checked:

  1. Make sure the mac is not in sleep mode
  2. Make sure you are connected through the same network

This solved also for me, thanks!

@staff The source issue is apparently a permission error when “ssh.exe” tries to read the private key file “RemoteToolChainPrivate.key” in the %APPDATA% subdirectory. It fails reporting this:

This private key will be ignored.
bad permissions: ignore key: [...]
Permission denied (publickey,password,keyboard-interactive).

For me it turned out the issue was non-latin characters in the user name. Namely it contained a “ö” and something interpreted that as “\244” or something like that.
So i made a new user named “test” and all worked fine.

As per MatzeOGH suggested, you can move the RemoteToolChainPrivate.key file elsewhere, but looking at the Unreal Engine documentation, they suggest you put it in your Unreal Engine installation folder under:


See this link under the (Optional Team Setup section):

When I put the file there, I was able to package the iOS for all my projects that were using UE4.21.0.

This not work for me, both in MacOS High Sierra and Mojave, 4.21 got this error, 4.20 and 4.19 got Permission denied. Just 1 week ago everything working fine. This Remote Build feature is great but it alway fail randomly (ノಠ益ಠ)ノ彡┻━┻

There was just a 4.21.1 hotfix that got released. There’s a bug fix in it which might help your problem:

Fixed! UE-66093 Unable to determine home directory for remote user after updating MacOS to Mojave 10.14.1


You will need to update your Visual Studio 2017 to 15.9.x if you’re running a C++ project, but 4.21.1 hotfix will generate a compiler warning if you don’t have this version so you’ll know if it’s right or not.

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

well 4.21.1 fix that problem, but now i have new bug, every project i have this error when package for iOS

*UATHelper: Packaging (iOS):     ld: framework not found iAD
UATHelper: Packaging (iOS):     clang: error: linker command failed with exit code 1 (use -v to see invocation)
PackagingResults: Error: linker command failed with exit code 1 (use -v to see invocation)*

It show up in 4.19 and 4.20 too

This worked for me. Thank you.