iOS Remote Build - Can't generate SSH "Unexpected Local arg"

I have been unable to successfully set up remote building for iOS on Windows in 4.17.2. After entering the remote server name and RSync username, I press the “Generate SSH Key” button and follow the prompts in the terminal.

Everything works as expected at first. I enter the password for the Mac I’m trying to connect to, press enter twice to skip adding a passphrase, and am greeted with messages telling me that it has generated public/private rsa key pairs and saved identification and keys. It then tells me that it is going to connect to the Mac again and “download the generated private key.”

It tells me the key will be stored in “C:\Users\Workstation 2\AppData\Roaming”\Unreal Engine\UnrealBuildTool\SSHKeys\ect…" and tells me to press any key to continue.

Upon doing so, I get the following error:

Unexpected local arg: /cygdrive/C/Users/Workstation
If arg is a remote file/dir, prefix it with a colon (:).
rsync error: syntax or usage error (code 1) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/main.c(1216) [receiver=3.0.4]

I can’t tell if the issue is the space between Workstation and 2 in the name of my computer’s user folder (judging from the fact that the path in the error ends after “workstation”) or something else, but either way I am unable to successfully setup remote build. My projects and engine versions are all on my D: drive, if that matters.

tldr: Attempting to generate SSH key for remote build results in “Unexpected local arg” error after generating public/private rsa key pair.

I have the same error, do you have a fix?

Could you fix this? I have the same error

Did you ever find a solution for this? Its driving me crazy. I followed all the steps and have tried some older methods as well but it seems like things change and the documentation doesn’t update accordingly. My computer is connecting to the Macbook and all appears well but then I get this message which I am assuming has something to do with Delta Copy since that is whats being used for the rsync process from my understanding.

We have the same error also, please help!

I am having the same issue. From what I have read the space could cause issues. However what I’m struggling with is how the people with UE4 have all of this working. Apparently there is a format within rsync that allows for spaces to be there so I’m not sure if that’s causing it. I have also read that the “:” after C in C:\User could cause it. I changed the name of my computer if I do recall and i still received the same error. I will have to check when I return to my PC after work. I am going to continue to dig into this and hope to resolve the issue. If you make any progress or find a solution please take the time to share.

Alright I finally figured this out and wanted to help everyone out. The space in your folder name is most certainly causing the issue. I had my full name with a space. This is where things get annoying but what I did was:

1.) Change your current user name to something different.
2.) Create a new user and give it administrative rights. (Use the name you want the folder to have. Remember no spaces)
3.) Restart the computer.
4.) Log into the new account.
5.) Transfer everything from your old folder to your new user folder.
6.) Restart the computer again.
7.) Delete the old account.

The only downside I have found so far is applications and any type of settings you had on your old account may no longer be there. All of my games and projects still remain because they belong to the computer and not the user itself. I had to change my default browser to chrome and it forgot all my saved passwords and things like that. But if you want to remote compile bad enough this worked for me. It sucks that you’re unable to rename that folder. It will not change when you change the username itself. It will remain whatever it is when you originally create the user. Hope this helps. If you need any addition direction feel free to comment and I will try and assist. So glad it fixed the error.

The issue is extra double quotes in their paths where there are spaces. Add the following lines to “(Unreal Engine Path)\Engine\Build\BatchFiles\MakeAndInstallSSHKey.bat”:

set DOCUMENTS=%DOCUMENTS:"=%
set CYGWIN_DOCUMENTS=%CYGWIN_DOCUMENTS:"=%

After those values are set.