To run ksh script via autosys job without asking password for file transfer


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers To run ksh script via autosys job without asking password for file transfer
# 1  
Old 02-18-2014
To run ksh script via autosys job without asking password for file transfer

I've K shell script. It will transfer the files from one server to other server using 'SCP' command. While running the script alone as a command line in UNIX ssh terminal its running with out asking password and files are transferred with out asking for password. But by running the script using 'Auto sys' jil file, its getting failed in the file transfer step stating connection to the server failed .... What should i do to make it successful????
# 2  
Old 02-18-2014
Quote:
Originally Posted by maheshbabu
I've K shell script. It will transfer the files from one server to other server using 'SCP' command. While running the script alone as a command line in UNIX ssh terminal its running with out asking password and files are transferred with out asking for password. But by running the script using 'Auto sys' jil file, its getting failed in the file transfer step stating connection to the server failed .... What should i do to make it successful????
Within the script you have probably a different environment than when you execute from commandline. Start investigating in which way the environment differs and make it equal.

The reason for scp not asking for a password is that a ssh-key is stored for the server/user combination you are connecting to. With the script you maybe use another user (which doesn't have this key stored), you may have not set some variable necessary for your ssh-client, etc., etc. ...

I hope this helps.

bakunin
# 3  
Old 02-18-2014
in the error log

In error log:
ssh_askpass: (exec(usr/sbin/ssh-askpass)): No such file or directory

Host key verification failed.
# 4  
Old 02-18-2014
Quote:
Originally Posted by maheshbabu
In error log:
ssh_askpass: (exec(usr/sbin/ssh-askpass)): No such file or directory

Host key verification failed.
So you have found the reason why it fails. Correct that and it should probably work.

bakunin
# 5  
Old 02-18-2014
Quote:
Originally Posted by maheshbabu
In error log:
ssh_askpass: (exec(usr/sbin/ssh-askpass)): No such file or directory

Host key verification failed.
That means that ssh wants to ask for a password, but has no terminal to get a password with and no other means to authenticate.
# 6  
Old 02-19-2014
How to fix this... With out giving password when running as a Job....
# 7  
Old 02-20-2014
When you "run it as a job [manually]", how is it getting the password? In our Autosys environment, we give the jobs the password automatically and it reads and goes on its' merry way.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Job Run Slower using Autosys than running through terminal

Hi All, We run Many jobs evryday using Autosys. Sometimes due to various reason we got to run the job from terminal as well (using nohup). We observed that the job running through terminal(nohup) takes much less time then the autosys (for same job). What can be the possible reason for such... (1 Reply)
Discussion started by: kg_gaurav
1 Replies

2. Windows & DOS: Issues & Discussions

AutoSys Job not waiting for script to complete

I'm not sure if this is the right place to post this issue...but here goes... I am converting a set of windows jobs from Control-M to AutoSys r11.3. The same command line is being executed in both systems. The Control-M job runs to compltion in about 1.5 hours, waiting for the entire batch... (3 Replies)
Discussion started by: ajomarquez
3 Replies

3. Shell Programming and Scripting

Please help me to develop this script for autosys job

:wall:Hi All, I want to build script to force start the list of child jobs under a box. I prepared this below script, but this script need to some bug fix at run time. Please help me to to develop this script. Please let me know if any thing require for this script. Advance thank for all.. ... (3 Replies)
Discussion started by: pradipta_pks
3 Replies

4. UNIX for Dummies Questions & Answers

Shell script - Finding Autosys job status

Hi, There are 2000 jobs in the list and i need to draw their status. I put all the jobs in the list and trying to read one by one from the list and to find out the status. Help me out in correcting the script. #!/bin/csh for a in $(cat Jobs_List.txt); do source <<path>> autorep -j $a... (1 Reply)
Discussion started by: venkatesht
1 Replies

5. UNIX for Advanced & Expert Users

Autosys job run on Sunday

Hi, I need to create a autosys job which will run on every sunday at 7:30 AM NY time for each 10 min interval of time. days_of_week: su start_mins: 0,10,20,30,40,50 run_window:"07:30" Is it fine? Please help Thanks, Anup (2 Replies)
Discussion started by: anupdas
2 Replies

6. Shell Programming and Scripting

Autosys filewatcher + ksh script

Hi, A ------> B ------> C I have a scenario where each day, my server B would ftp to server A and pull (A,B,C,D,E) from a specific directory. Server C would need files (B,D) only when server B finished receiving from server A. These files change everyday, so sometimes it takes longer... (3 Replies)
Discussion started by: arex876
3 Replies

7. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

8. Shell Programming and Scripting

autosys job error file not created

Hi All Something really weird happened, I have an autosys job: insert_job: CAT_LDN_BaseCorrs job_type: c command: $$(LDNFIRC)\CAT_LDN_BaseCorrs.bat -modeldate $$MODEL_DATE -cutdate $$CUT_DATE permission: gx, mx, wx description: "Rerun=0;625;#CAT_Autosys" std_out_file:... (0 Replies)
Discussion started by: evilsmile2004
0 Replies

9. Shell Programming and Scripting

autosys job name in the called script

Hi, i have an autosys job 'AUTJOBA' that calls a script script1.sh Now, inside the script i would like to know the autosys job that kicked off this script. When AUTJOBA runs script1.sh, will it set an environmental variable for this shell session that can be accessed within this script? ... (1 Reply)
Discussion started by: ysrinu
1 Replies

10. UNIX for Advanced & Expert Users

Documentation and books on Autosys Job Control Tool from Autosys

My project uses Autosys. I am new to this product and I don't know where to start from. Q1. Please provide me the link where I can get Autosys documentation Q2. Please refer a good book on Autosys. (Beginner/Intermediate Level) (0 Replies)
Discussion started by: gram77
0 Replies
Login or Register to Ask a Question