Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 in the Linux machine ?

share|improve this question
add comment

3 Answers 3

up vote 5 down vote accepted

Install openssh-server Install openssh-server on Ubuntu and PuTTY on Windows. Then you can get a shell on your Ubuntu machine from the Windows one.

Once logged into your Ubuntu machine remotely, you can use kill or pkill or killall as you prefer. I find pkill simplest if you just want to kill based on the process's name. For example: pkill firefox

If, however, you wanted to kill a specific process whose PID (process ID) you know (possibly from looking through the output of ps -ef), you can use kill 1234

You can combine kill signals with these to say how they should be killed. The default is 15, or SIGTERM (term = terminate), which is a polite request to please close now. If a process doesn't respond to that, 9 (SIGKILL) is popular. See man 7 signal for more information about signals. To use this with kill or pkill you'd simply add -9 for example: kill -9 firefox

share|improve this answer
1  
kill -9 song: youtube.com/watch?v=Fow7iUaKrq4 –  Joe Philllips Oct 22 '10 at 20:12
    
hehe I was humming that in my head as I typed –  maco Oct 22 '10 at 20:15
    
sudo apt-get install openssh-server is enough to install open ssh server in ubuntu? –  Renjith G Oct 22 '10 at 20:26
1  
Yes. Clicking the link I provided will automatically start up apt on your computer too. –  maco Oct 22 '10 at 20:41
    
Thanks..but now am not in Ubuntu!!! ;-) –  Renjith G Oct 22 '10 at 21:02
add comment

If you are running an ssh daemon on your Ubuntu machine then you can login via SSH using PuTTy from your windows machine.

Once you are logged in, you can look at the current running processes with the ps aux command and then use kill or pkill to end the task

Note: You may need to use sudo with the kill commands

share|improve this answer
add comment

If you have sshd installed on the Ubuntu box (almost always a good thing) you can connect and kill the process as normal (e.g. killall process, or similar).

On the Ubuntu box:

$ sudo apt-get install ssh

On Windows, download PuTTY: http://www.chiark.greenend.org.uk/~sgtatham/putty/

Open PuTTY and set it to connect to the Ubuntu box's IP address (e.g. 192.168.0.1). You should be presented with a login prompt, so provide your Ubuntu username and password.

As maco has already said, there are a variety of ways of killing processes - just take your pick of pkill, killall etc., e.g.:

$ killall firefox
share|improve this answer
    
Can you mention it clearly with steps? –  Renjith G Oct 22 '10 at 20:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.