【发布时间】:2014-03-23 21:16:53
【问题描述】:
我不能直接访问目标主机,需要ssh作为代理。
如何从本地使用 ssh 杀死进程?我试试这个:
ssh root@$center "ssh root@$ip \"ps -ef|grep -v grep|grep $target_dir/$main|awk '{print \$2}'|xargs kill\""
出现错误:
kill: can't find process "root"
以及如何避免进程不存在的错误?
【问题讨论】:
-
您的尝试有什么问题?你有错误吗?