我必须远程连接到一个网关(在Linux平台上工作),其中有几个可执行文件(signingModule.sh和taxModule.sh)。 现在我想在我的桌面上编写一个脚本,它将连接到该网关,并在两个不同的终端中运行signingModule.sh和taxModule.sh。如何在远程机器上运行多个脚本
我已经写了下面的代码:
ssh [email protected] #to connect to gateway
sleep 5
cd /opt/swfiscal/signingModule #path of both modules
./signingModule #executable.
但是通过这个代码,我能够连接我的网关,但连接到网关后一无所获正在发生的事情。
第二码:
source configPath # file where i have given path of both the modules
cd $FCM_SCRIPTS # variable in which i have stored the path of modules
ssh [email protected] 'sh -' < startSigningModule** #to connect and run one module.
为这样的输出我得到:
-source:用configPath:文件未找到
请帮我工作了这一点。提前致谢。
注:
- 我可以复制,如果需要粘贴在网关我的文件。
Gnome-Terminal
或任何相关的替代方案是不是在我的网关
你可以做这样的事情。 ssh bar @ foo“command1 && command2” –
它不能正常工作:( –
您是否收到任何错误? –