-2

I am using java to run a Psexec command to excute a process on a remote computer:
Java -> Psexec -> remote computer starts a process.

I have the PID of that process.
Is there a way to have the remote computer terminate that process?
Maybe using psexec to tell the remote computer to run a cmd command to terminate it ?

David8988
  • 79
  • 1
  • 1
  • 7

1 Answers1

0

If both your local and your remote machine are UNIX-based (i.e. macOS or Ubuntu) then you can use ssh:

ssh user@remote_host 'kill -9 <pid>'