# Chmodding RemoteToolChainPrivate.key for iOS remote builds

**URL:** <https://forums.unrealengine.com/t/chmodding-remotetoolchainprivate-key-for-ios-remote-builds/407087>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [October 15, 2017, 7:41pm UTC](https://forums.unrealengine.com/t/chmodding-remotetoolchainprivate-key-for-ios-remote-builds/407087 "2017-10-15T19:41:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lounges](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lounges](https://forums.unrealengine.com/u/lounges)\
**Post date:** [October 15, 2017, 7:41pm UTC](https://forums.unrealengine.com/t/chmodding-remotetoolchainprivate-key-for-ios-remote-builds/407087/1 "2017-10-15T19:41:53Z")

</div>

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

Does anyone actually have this working?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1cbc21f5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1cbc21f5](https://forums.unrealengine.com/u/anonymous_user_1cbc21f5)\
**Post date:** [December 13, 2017, 11:29am UTC](https://forums.unrealengine.com/t/chmodding-remotetoolchainprivate-key-for-ios-remote-builds/407087/2 "2017-12-13T11:29:44Z")

</div>

Hello,

I’ve had the same issue as well and it took ages to figure it out, I was using Unreal Engine 4.18 though. To fix the ‘Permissions 0660’ error, I followed the instructions on this post: [How to launch Code Project to iOS on Windows? 4.13 - Mobile - Epic Developer Community Forums](https://answers.unrealengine.com/questions/480092/how-to-launch-code-project-to-ios-on-windows-413.html)

Specifically the commands:

```
chgrp.exe Users /cygdrive/C/Users/nicho/AppData/Roaming/Unreal\ Engine/UnrealBuildTool/SSHKeys/nicky/nick/RemoteToolChainPrivate.key
chmod.exe 600 /cygdrive/C/Users/nicho/AppData/Roaming/Unreal\ Engine/UnrealBuildTool/SSHKeys/nicky/nick/RemoteToolChainPrivate.key

```

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.

I hope this helped you, let me know!

---

<div class="post-metadata">

**Author:** ![IslandPlaya](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/islandplaya/32/1194500_2.png) [@IslandPlaya](https://forums.unrealengine.com/u/IslandPlaya)\
**Post date:** [April 18, 2018, 1:52am UTC](https://forums.unrealengine.com/t/chmodding-remotetoolchainprivate-key-for-ios-remote-builds/407087/3 "2018-04-18T01:52:51Z")

</div>

This was very helpful, especially the ssh problem which had me stumped. Thank you!

---

<div class="post-metadata">

**Author:** ![njivkov](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@njivkov](https://forums.unrealengine.com/u/njivkov)\
**Post date:** [July 23, 2018, 1:39pm UTC](https://forums.unrealengine.com/t/chmodding-remotetoolchainprivate-key-for-ios-remote-builds/407087/4 "2018-07-23T13:39:00Z")

</div>

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 :

[https://github.com/EpicGames/UnrealEngine/pull/3166/commits/3ab2ab6cebd701e051a70a4f92d278494701e737](https://github.com/EpicGames/UnrealEngine/pull/3166/commits/3ab2ab6cebd701e051a70a4f92d278494701e737)

After these changes it should work like a charm 😉

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_624ad4dc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_624ad4dc](https://forums.unrealengine.com/u/anonymous_user_624ad4dc)\
**Post date:** [January 31, 2020, 5:35pm UTC](https://forums.unrealengine.com/t/chmodding-remotetoolchainprivate-key-for-ios-remote-builds/407087/5 "2020-01-31T17:35:31Z")

</div>

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 ☹

---

<div class="post-metadata">

**Author:** ![mechanodroid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mechanodroid](https://forums.unrealengine.com/u/mechanodroid)\
**Post date:** [July 14, 2020, 5:09am UTC](https://forums.unrealengine.com/t/chmodding-remotetoolchainprivate-key-for-ios-remote-builds/407087/7 "2020-07-14T05:09:26Z")

</div>

Many of these answers are needed to solve the problem, however what I found is additionally needed with 4.24 is the following:

1. Make sure your username on the mac is the same as your username on windows
2. Add the line “StrictModes no” to your sshd\_config file on Mac
3. Run the editor as ADMINISTRATOR.

I think point #3 is the most important.

---

<div class="post-metadata">

**Author:** ![mechanodroid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mechanodroid](https://forums.unrealengine.com/u/mechanodroid)\
**Post date:** [July 14, 2020, 5:13am UTC](https://forums.unrealengine.com/t/chmodding-remotetoolchainprivate-key-for-ios-remote-builds/407087/8 "2020-07-14T05:13:55Z")

</div>

see my post below.

---

<div class="post-metadata">

**Author:** ![channie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@channie](https://forums.unrealengine.com/u/channie)\
**Post date:** [November 23, 2022, 3:25pm UTC](https://forums.unrealengine.com/t/chmodding-remotetoolchainprivate-key-for-ios-remote-builds/407087/9 "2022-11-23T15:25:47Z")

</div>

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.
