Results 1 to 4 of 4
Hello All,
I am trying to run some simulations through SSH from my mac on our university SOLARIS system. My problem is that whenever I want to execute a command ...
- 04-14-2011 #1Just Joined!
- Join Date
- Mar 2011
- Posts
- 5
Running script and commands through SSH
Hello All,
I am trying to run some simulations through SSH from my mac on our university SOLARIS system. My problem is that whenever I want to execute a command I get an error which says "Invalid argument".
Maybe I should explain more what I want to do and what I did.
Firstly I installed a software which I need to run, I did it through ThinLink, and it seems that it is running fine without a problems. I can execute all commands and scripts. Installed software contains tens of small programs. I have compiled it and assign the PATH to be able to use the software. This was still via ThinLink. Then I wanted to start to use SSH since it should be more secure and also faster for me. When I wanted to do same think as in ThinLink I got the message Invalid argument. For example I run a command which use program gensky.
I wrote:I got:Code:gray1(dava) $ gensky 4 4 4
(i replaced the path to my home directory by dots)Code:-bash: ............/Radiance_install/bin/gensky: Invalid argument ~
The PATH to the program seams correct but it does not run correctly. With SSH I can log into the remote machine and see all the files which I have on the disk as well as to run standard commands like mkdir etc. But I cannot run the programs which I installed.
Could anyone advice me on this or possible to show me some examples or give me some reference which I can study. I have tried to read man page for shh but it did not helped me that much since there is many things which I don't understand.
I am probably doing something wrong or missing something completely.
Thank you for any comments and advices.Last edited by Apfik; 04-14-2011 at 06:32 PM.
- 04-15-2011 #2Just Joined!
- Join Date
- Sep 2010
- Posts
- 2
As long as the scripts on the remote server are executable, the only thing I can think of would be to put the string in quotes. An example I have in one of my scripts is
file=$1
ssh myserver "mv migrate/xml/$file migrate/xml/applied"
hope this helps.
- 04-15-2011 #3Just Joined!
- Join Date
- Mar 2011
- Posts
- 5
Hi
I tried to do this and also different options with SSH, but it did not work.
I was looking through all documentation I could find about those servers and I found that there three different servers and I was logged to desktop server instead of application server. When I logged in using ThinLink I was able to logged to application server and run the code, but I could also log to the desktop server and it did same thing as with ssh.
I assume that this is the problem. I have contacted the support but it is taking time to get answer from them.
- 04-16-2011 #4
Hi there,
You can try running SSH with more verbosity, I.e. Use -vvv at the command libe to see if it is actually ssh with the problem.
It sounds like it could be a path problem though. When you run the program when it works are you in a directory other than your home? You may need to prepend your command with a cd command.
Also, your PATH variable may be being reset by SSH depending on the server configuration, so you may need to send it like so:Code:ssh <server> "cd <directory>; gensky 4 4 4"
You should be able to test this by just logging in and running the commands above and seeing if they work for you in your normal shell.Code:ssh <server> "PATH=<path>; cd <directory>; gensky 4 4 4"


Reply With Quote