ssh在远程执行多个命令
妙音
posted @ 2014年1月21日 11:18
in linux
, 8816 阅读
执行单个命令
1 | ssh wyq@135.32.9.98 'ps -ef |grep process.py' |
在远程主机上执行命令"ps -ef |grep process.py",在本机就可以看到输出.
使用分号分隔,允许一次执行多个命令
1 | ssh wyq@135.32.9.98 'cd ~/src; sh start.sh' |
进入到~/src目录,然后执行脚本sh start.sh
2025年3月24日 18:22
I’m impressed, I have to admit. Truly rarely should i encounter a blog that’s both educative and entertaining, and let me tell you, you’ve got hit the nail to the head. Your thought is outstanding; ab muscles a thing that too little people are speaking intelligently about. We are very happy that I came across this at my try to find some thing about it. 바카라사이트