Please Help: How to Call SSH Trust from Cron job.

Hi All,
I am tring to excute a SSH trust command from a script which is invoked by crontab.

Details:

Crontab file contains the following line:

15 00 * * * /users/dummy_user/dummy_script1.sh

dummy_script1.sh contains the following line:

SSH -1 server_2 "/users/dummy_user/dummy_script2.sh" > /users/dummy_user/output.txt

exit

When I excute
/users/dummy_user/dummy_script1.sh directly it excutes fine.

But when its called from Cron job its not at all excuting the SSH command.

Note: All auth keys are set in both servers.

Hi,
Make sure that the script You run have sufficient environment variables set. You may need to source in any profile file that is used in Your command shell.

/Lakris

Hi Lakris,
Thanks for the reply.
All then envi varialbles are set to 777. And can you please tell me wat kind of profile options needs to be defined for SSH.
Thanks in advance.

Regards
Suman

What I meant was that when You run something from the command line You a fuller set of environment variables, such as PATH. Do this experiment, put these lines in Your script:

env > /tmp/cronenv
. ~/.bashrc
env > /tmp/userenv

... (the rest of the code)

and compare the two. The first one shows the environment used by cron, the second what Your command prompt has available. You may need to include /etc/profile or some other rc-file depending on what shell You use.

Are You really calling ssh with capitals, SSH?

/Lakris

No I am not using upper case ssh.