I am encountering an error when trying to use the iOS remote build feature. I believe I have everything setup correctly EXCEPT the permissions on the private key that Unreal generated.
Here is the error:
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
Permissions 0660 for '/cygdrive/C/Users/<username>/AppData/Roaming/Unreal Engine/UnrealBuildTool/SSHKeys/<ip>/<username>/RemoteToolChainPrivate.key' are too open.
It is recommended that your private key files are NOT accessible by others. This private key will be ignored.
Which is an easy enough error to fix on a Unix system, but I just canât seem to get them set correctly on windows. Here are some things I have tried:
running chmod.exe from Engine\Extras\ThirdPartyNotUE\DeltaCopy\Binaries (which is near as i can tell where ssh gets run from)
using the linux subsystem for windows 10 and chmod
using cygwyn and chmod
adjusting permissions using the windows permissions dialog
Replacing the directory with your own directory above.
After solving this error I had another one though which I could not figure out:
LogPlayLevel: UnrealBuildTool: Warning: Identity file /cygdrive/C/Users/myUser/AppData/Roaming/Unreal Engine/UnrealBuildTool/SSHKeys/192.168.1.xx/myUser/RemoteToolChainPrivate.key not accessible: No such file or directory
This was happening for me because the RemoteBuildTool is set-up to look for the first ssh.exe it finds and then tries to load the cygwin path. If that ssh.exe it finds is a windows native version like in my case, it will run it with the cygwin path which is not a valid windows path and it will fail. To check which ssh.exe is used you can open a terminal and type:
where ssh
In my case it was returning:
C:\Program Files\Git\usr\bin\ssh.exe
which is a windows native version. I navigated to that file and changed âssh.exeâ to something else like âssh-1.exeâ and it worked (If you run âwhere sshâ on a terminal now it should tell you that it canât find the file). Of course now every time I need to use git I have to change it back to âssh.exeâ, so it is not the best solution, but a working solution nonetheless, as I could not find anything else on the forums after hours of trying.
If rsync issue that canât find ssh.exe is still bothering you and you have a source engine, you can apply changes from this commit and rebuild UnrealBuildTool and iPhonePackager :
After doing the first part, I get a new error:
UATHelper: Packaging (iOS): ERROR: Unable to determine home directory for remote user. SSH output:
UATHelper: Packaging (iOS): Permission denied (publickey,password,keyboard-interactive).
PackagingResults: Error: Unable to determine home directory for remote user. SSH output:
UATHelper: Packaging (iOS): Took 0.5824751s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (iOS): UnrealBuildTool failed. See log for more details. (C:\Users\kev_2\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.24\UBT-MyProject7-IOS-Development.txt)
UATHelper: Packaging (iOS): AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (iOS): BUILD FAILED
any help on that? I go to the key and change permissions, then I get the 0660 error again, then I run the cygwin code again, then I get that error again
I encounter this issue right now and cant build per remote.
Is the method above still the best method to that date?
Maybe other people had issues with it in the last time?
changing StrictMode value is the key here: it allows bypassing permission check for the private keyfile, which is fine if you work on a private, firewalled internal network.