Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
5 votes
3 answers
26k views

Kill remote process via ssh

I have a process that I want to kill remotely. I tried ssh remotehost "kill -9 $(ps -aux | grep foo | grep bar | awk '{print $2}')" but this returns the error kill: usage: kill [-s sigspec | -n ...
chrise's user avatar
  • 231
15 votes
3 answers
4k views

How do ssh remote command line arguments get parsed

I've seen the questions and answers about needing to double-escape the arguments to remote ssh commands. My question is: Exactly where and when does the second parsing get done? If I run the ...
onlynone's user avatar
  • 636