We need to install the EXE on the remote computer. I want to open the SSH connection remotely and run the EXE file. It succeeded. However, when I close the SSH connection, the EXE will be killed. Is there a 'nohup' command similar to linux to solve this problem in windows. I tried start /b and start /b without success.
Asked
Active
Viewed 845 times
1 Answers
0
However, when I close the SSH connection, the EXE will be killed.
Double-check that: as explained in "What's the nohup
on Windows?":
On Windows it's not normal that a process terminates once its parent was killed (like Unix-likes do it normally).
Therefore there is no direct necessity for something like nohup.
You can also try and run in your ssh session:
START /B /MIN "cmd.exe" /C "myscript.bat"
And see if it survives the SSH closing event.

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
1Thanks for your answers, I tried your way, but when I closed openssh, that exe was killed. My approach is to connect to windows through the ssh connection tool, and then execute (START /B /MIN cmd.exe /C "a.exe"). After the execution is successful, I close the openssh connection and the exe is killed – Sunth Jun 08 '21 at 02:32
-
@Sunth Can you try to launch the nohup VB script instead of a.exe? As in https://stackoverflow.com/a/66986585/6309. – VonC Jun 08 '21 at 05:46