Saturday 15 September 2012

bash - Unable to kill remote commands by name through ssh -



bash - Unable to kill remote commands by name through ssh -

i want execute commands processid name , kill processes has listed machine remotely, through ssh. running below command,

ssh user@ip "kill -sigint `ps -ef | grep <process name> | awk '{print $2}'`"

but checking locally process name instead of checking on remote machine.

can help me on why command not working ?

you can lot more simply:

ssh user@ip "pkill -int <process name>"

see -f alternative pkill.

bash ssh

No comments:

Post a Comment