Search code examples
sshminecraftopenssh

Windows ssh - How to keep proccess running after Disconnect


I want to start a java Process(Minecraft Server) over SSH(PHP Script). And on disconnect it should not be closed.

I am using Bitvise SSH Server for Windows and 64 Bit Java. I can start the server but if I disconnect from the ssh server then the java Process(Minecraft server) stops. I tried with PUTTY but same Problem.

Is there a command for cmd, like screen for Linux, which puts a process in the background?

Thanks.


Solution

  • I'm using OpenSSH server for windows. Managed to get it working using this Power shell command:

    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Invoke-WmiMethod -Class Win32_Process -Name Create -ArgumentList C:\path\your-command.exe