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:
(i replaced the path to my home directory by dots)
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.
I don't think the man page for ssh will be helpful here.
There must be some difference between the environment when you login locally, and the environment when you login with ssh. Can you compare the output of env in both?
Hello, thank your for response.
Should I look for anything specific? There is quite a lot information, and probably not all of them are relevant.
Quote:
Originally Posted by Corona688
I don't think the man page for ssh will be helpful here.
There must be some difference between the environment when you login locally, and the environment when you login with ssh. Can you compare the output of env in both?
Hello, thank your for response.
Should I look for anything specific? There is quite a lot information, and probably not all of them are relevant.
I can't be specific, sorry, I don't know what things in the environment the dozens of programs you mentioned use. I'm just wondering what's different. You could do:
to see the differences listed explicitly.
There are some differences definitely, unfortunately I don't understand it. I have attached three files with info about the environment. envlocal (logged through ThinLink), envremove (logged through SHH) and their difference diff.
Maybe some one can see from the files what is the problem.
Thank you
Your environments are so different there wasn't much point diffing it. I don't suppose you're getting a different shell when you ssh in than when you login locally?
Your environments are so different there wasn't much point diffing it. I don't suppose you're getting a different shell when you ssh in than when you login locally?
I am not sure if I understand it correctly. But I guess that not. When I ssh I use
Code:
ssh username@login.gbar.dtu.dk
However I am not logged exactly on the machine when I am "locally" logged because I also use remote access by ThinLink.
I guess that it can be something with permissions since regular things are working with shh but not newly installed programs. But I don't understnad that much all of this, so it could be also something else.
Hi,
I am trying to run commands on a list of servers that I can ssh to and just want to know if there is a 'cleaner' way of doing this.
At the moment, I am doing as below. Is there a way that I can escape the double quote differently? If a use a single quote to enclose the commands that I... (1 Reply)
Hi All,
I have put a perl script together to go and collect some information from multiple nodes/endpoints. The script works absolutly fine however I want to make it quicker.
You will see in the below that my script calls an expect script called ssh_run_cmd2.exp followed by the IP of... (7 Replies)
Hello,
I'm trying to create a ksh script to ssh to a remote server, enter the password and a couple commands. For security reasons I have changed the login, password and ip in my example.
#!/bin/ksh
ssh -t -t username@12.5.5.3 << EOF
password
cd bin
pwd
EOF
When I run it. It... (5 Replies)
I'm trying to copy files from a remote windows server to Unix server. I was successfully able to copy files from windows server using command prompt but when I run these commands from a script it's not working as expected. commands used:
sftp user@remoteserver.com
lcd local_dir
cd... (3 Replies)
Hi all!
I am trying to write a script that will check if a certain directory is available at several different nodes and then do stuff in it .....
On the beginning of the script I give as a variable the directory and the number of the nodes and then I loop like this:
for... (3 Replies)
Hi All,
Is there a way in which a long running command can terminate by itself inside a script? I need something like below:
echo Start
<command>
exit
If the <command> is taking more than say 100 seconds to complete, the script should exit without manual intervention.
Thanks,
Deepak (2 Replies)
Executing two unix commads via perl script one after another
e.g: make clean
bsub -i -q short make
have tried using exec but the second command doesnt executes (1 Reply)
I ran an ssh command to run a script on a remote server
ssh -l <user> <servername> /path/to/script/scriptname
This works fine - and the script is executed correctly.
However - I put this command into a script, that I want to run from cron every hour, to execute the file on the remote... (31 Replies)
I have written some scripts that do a few admin tasks on 23 servers I manage.
Usually I execute these scripts from one server by running ssh commands remotley, i.e.
ssh root@server2 shellscript, ssh root@server2 shellscript & so on..
It works fine but I want to improve this by writing a... (3 Replies)
I'm new to unix and I have a fairly simple problem:
Lets say I am in a specific directory and I run the command: "dirs" ,
I get an output of all the folders that i pushed into the stack (as expected),
buut,
when when I create a script (called test):
#! /bin/csh
dirs
and then i run:... (2 Replies)