I have run into a strange issue that Computer A can see Computer B, Computer B can see Computer C, but Computer A can not see Computer C.
I would like to make a bash script that can be run on A that will call arbitrary commands on C, but I can't seem to get the double quotes working properly. The idea being:
AMB_CMD='source eniron.dat; cd path/to/code/; make clean all' ssh -t username@ComputerB "ssh -t username@ComputerC "$AMB_CMD"" I thought resolving what is to be running on B would fix it, like this:
AMB_CMD='source eniron.dat; cd path/to/code/; make clean all' B_CMD=ssh -t username@ComputerC "$AMB_CMD" ssh -t username@ComputerB "$B_CMD" But I am still having issues.
make clean allis just something I put there to have something there. In my actual script I cd to the location, source and environ file, then run the make"-toption tosshto force it to allocate a pseudo terminal.source eniron.dat(sic) will be run on ComputerC,cd path/to/code/; make clean allwill be run on ComputerB. Try this instead:AMB_CMD='...'; ssh u@B ssh u@C "'$AMB_CMD'"