I have to remotely connect to a gateway (working on Linux platform), inside which I have couple of executable files (
Now I want to write one script in my desktop which will connect to that gateway and run
taxModule.sh in two different terminals.
I have written below code:
ssh firstname.lastname@example.org #to connect to gateway sleep 5 cd /opt/swfiscal/signingModule #path of both modules ./signingModule #executable
but through this code I am able to connect my gateway but after connecting to gateway nothing is happening.
source configPath # file where i have given path of both the modules(configPath is placed in local machine) cd $FCM_SCRIPTS # variable in which i have stored the path of modules ssh email@example.com 'sh -' < signingModule #to connect and run one module (signingModule is placed in remote machine)
As an output of this I am getting:
source: configPath: file not found
Please help me working this out. Thanks in advance.
- I can copy paste my files in that gateway if required.
- Gnome-Terminal or any other alternatives of this is not working in my gateway.
- I have to run all modules (signing and tax) in different terminal coz my other application will work only when these two modules are up. so to make them run simultaneously we have to run them in different tab or terminal.
- I have to write a script in my local machine which will run both modules (signing and tax) which are placed in remote gateway. So i want to run that script in my local machine which is gonna hit gateway's modules.