I was having a problem getting the system user to connect to a remote host via SSH, but didn’t know why. The easiest way to check would be to try to run the command as the system user, but how? Turns out, you need to create a service:
sc create testsvc binpath= "cmd /K start" type= own type= interact
Then start the service:
net start testsvc
This will actually send an error back, but cmd.exe was told to start another cmd.exe that lives on. And there you have your system shell.
The answer to my problem turned out to be that the System user didn’t have access to id_rsa.