通过SSH执行远程服务器上的命令,很好很强大,方便多了。
- for i in 3 23 5 15 ; do ssh root@192.168.1.$i ps auxH|grep httpd|wc -l ; done;
- #就可以列出192.168.1.3,23 ,5 ,15,四台服务器上的httpd线程数;也可以利用{1..250} 依次遍历
原文:http://bashcurescancer.com/run_remote_commands_with_ssh.html
amxku 发表于 2008-06-26, 00:31
通过SSH执行远程服务器上的命令,很好很强大,方便多了。
原文:http://bashcurescancer.com/run_remote_commands_with_ssh.html