3

Is it possible to kill a process running in an Ubuntu machine from a Windows (XP) machine remotely connected via LAN?

I can kill the process in a windows machine from a remote windows machine (in LAN) by the following command:

taskkill /S system /U username /P password  /IM process.exe

Is there any thing like that to kill the process running on the Linux machine?

1

2 Answers 2

4

Do you have SSH or Telnet access to the Linux machine? (Typically, SSH is more reliable in trouble situations, but either can work.)

Login, use top, ps, or pgrep to get the process id (pid) of whatever needs killing, and then kill away with kill PID or kill -9 PID on the command line. If you have a new enough system, you can even kill processes from within top by choosing one and pressing 'k'.

Furthermore, ssh and rsh can be used to remotely execute commands without the whole interactive login session, if that's what you end up needing in the future:

$ ssh USER@HOSTNAME COMMAND
5
  • +1, and I just want to add that on Windows, you can use PuTTY to ssh to a Linux/Unix machine chiark.greenend.org.uk/~sgtatham/putty
    – phunehehe
    Oct 23, 2010 at 3:36
  • I would just note that you want to avoid kill -9 if you can. Try kill PID twice, then try kill -INT PID before trying kill -9. SIGKILL is untrappable and thus doesn't allow the program to clean up after itself.
    – Steven D
    Oct 23, 2010 at 4:18
  • You're right. Of course, I find kill -9 satisfying when angry. ;D Nov 6, 2010 at 11:27
  • Better not use telnet; your password will be send in the clear. (although if you LAN only has completely trusted people on it, it won't hurt).
    – kasterma
    Dec 2, 2010 at 18:16
  • Seriously? Let the admin worry 'bout that. If he's still got rlogin available, he might as well use it. :P Dec 3, 2010 at 8:30
1

Windows has these tools for remote management built-in to the shell. For remote management of a *nix host, you need to get a shell on the remote host. As suggested above, you need an ssh client of some sort. You can use a windowed application like putty (linked above), or there is a native port of openssh for win32 that doesn't require cygwin. You can find it here: http://www.nomachine.com/contributions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .