I am trying to access a resource that is only available via SSH using a Mathematica notebook on my local computer, however I am not sure how I could tunnel a Mathematica command in such a way. I cannot run Mathematica on the remote resource.
The command I want to execute is
URLExecute["http://server",parameters]
which is equivalent to running wget "http://server?parameters" in the terminal.
I tried to stack commands using the Run[] command, but it does not seem to work.
Run["sshpass -p "<> password <> " ssh " <> user "@" <> server;
"wget \"http://server?parameters\"";]
The return code I get while doing this is 0, but it does not seem like the command has actually been run on the remote server. I tried adding a "mkdir test" after the ssh command, and this is neither run on the remote server nor locally. However, if I remove the ssh command, the "mkdir test" successfully produces a folder in the Notebook directory.
Also, if I can run the wget command like this, how do I tunnel the file that is produced into Mathematica, instead of just taking the return code?