yum更新initscripts和selinux失败
fedora的firewall配置

ssh在远程执行多个命令

妙音 posted @ 2014年1月21日 11:18 in linux , 8745 阅读

执行单个命令

ssh wyq@135.32.9.98 'ps -ef |grep process.py'

在远程主机上执行命令"ps -ef |grep process.py",在本机就可以看到输出.

使用分号分隔,允许一次执行多个命令

ssh wyq@135.32.9.98 'cd ~/src; sh start.sh'

进入到~/src目录,然后执行脚本sh start.sh

 


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter