Remote Target Execution

Tekisasu Engine has gained the ability to remotely execute and debug game projects on another system. This is useful because you can run a Target Execution Environment on a lower spec personal computer as development progresses to ensure that the game is operating well on your lowest or mid specs published with the game, rather than execute locally on your workstation which might be more powerful than most computers the game is intended to run on.

For reference, Tekisasu currently targets the Windows 10 operating system as the lowest common spec for PC. Poncho Poncho Land is developed with a Dell Inspiron 7490 running as the Target Execution Environment.

The Remote Target Execution Environment depends on the optional OpenSSH Server being installed, configured properly and running on the Target Execution Environment and OpenSSH Client being installed on the development workstation. OpenSSH keys are generated on both machines, and the public key of the development workstation is deployed to the authorized_keys file on the Target Execution Environment.

The following steps must be taken to ensure that the Remote Target Execution Environment functionality works as intended:

ON THE TARGET EXECUTION ENVIRONMENT:

(In a powershell with Administrator elevated privileges)

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

Click on Start and search for Services.msc.

Search for OpenSSH Server and OpenSSH Authentication Agent

In the properties of each service, set the Startup type to Automatic and start the service.

(In a powershell with Administrator elevated privileges)

ssh-add .\id-rsa

ON THE DEVELOPMENT WORKSTATION:

(In a powershell with local user privileges)

cd $env:USERPROFILE\.ssh
ssh-keygen.exe

(Hit enter at each prompt without a password until the key is generated)

ON THE TARGET EXECUTION ENVIRONMENT:

Login with a local account (not a Microsoft account) that will be intended to run the executable packages from the development workstation.

(In a powershell with local user privileges)

cd $env:USERPROFILE
mkdir .ssh
cd .ssh
New-Item authorized_keys

Copy the contents of the $env:USERPROFILE\.ssh\id_rsa.pub from the development workstation to the $env:USERPROFILE\.ssh\authorized_keys file. Ensure that UTF-8 encoding is used.

In Explorer, navigate to C:\Users\[YOUR USERNAME]\.ssh\

Right click on authorized_keys and go to Properties.

Click on the Security tab.

Click the Advanced button at the bottom.

Click the Disable Inheritance button at the bottom and choose the option “Convert inherited permissions into explicit permissions on this object” when prompted.

Remove the Administrators permission. There should only be your local user and SYSTEM in the ownership list.

(In a powershell with Administrator elevated privileges)

cd C:\ProgramData\ssh\
notepad sshd_config

Comment out the “Match Group administrators” line at the bottom, as well as the line directly underneath it that is indented. It should look like the following before you save:

# Match Group administrators                                                    
#       AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys 

Reboot the computer hosting the target execution environment.

Now, from your development workstation, ssh into the target execution environment so that the development workstation adds it to the known_hosts file.

Exit the ssh session, and verify that the key is working by creating a new ssh session. It should now not prompt you for a password or request that you add the host to the known_hosts file.

(In a powershell with Administrator privileges)

Set-ExecutionPolicy Bypass

Inside Tekisasu Engine, go to Project > Export and under SSH Remote Deploy, click Enabled, set host to “[YOUR USERNAME]@[ip address of your target execution environment]”, and hit close. You can now press the remote deploy button instead of the play button.