-
Strange ssh problem?
Hi all,
I am trying to run a script on a server remotely with ssh using the below command with no success
ssh user@server.edu sh foldername/myscript.sh
and the script is:
>>>>>>>>>>>>>>>>
unset DISPLAY
matlab > matlab.out 2>&1 << EOF
matlabfile
print file
exit
EOF
>>>>>>>>>>>>>>>>
here "matlab" is a program which runs another script called "matlabfile"
But the script somehow does not run.
I know for a fact that the way I am calling the script through ssh is right and I am pointing in the right location of the script. However the fact that is in a folder which is not my main user directory causes it to not be able to run through ssh. I can run it fine through ssh if the script is in the main user directory but not if it is in a folder within the main directory.
I can also confirm that if I connect to the server and cd into the folder and run it from there (sh myscript.sh), it also runs just fine.
This is driving me crazy.
Can anyone help?
Thanks!
-
nevermind I fixed the problem! :cool: