注册 | 登录 | 归档 | 搜索 | 标签 | 评论 | 链接 | 滚动板 | 在线工具
浏览模式: 标准 | 列表 Tag: shell

通过ssh执行远程服务器上的命令

通过SSH执行远程服务器上的命令,很好很强大,方便多了。

PS: for i in 3 23 5 15 ; do ssh root@192.168.1.$i ps auxH|grep httpd|wc -done
#就可以列出192.168.1.3,23 ,5 ,15,四台服务器上的httpd线程数;也可以利用{1..250} 依次遍历。
原文:http://bashcurescancer.com/run_remote_commands_with_ssh.html

Tags: ssh, shell, linux