#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2014
    Posts
    2
    Rep Power
    0

    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. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,392
    Rep Power
    1871
    Originally Posted by manual page
    -i identity_file
    Selects the file from which the identity (private key) for public key authentication is read. This option is directly passed to ssh(1).
    If you're running over ssh, then the secure connection is already made.

    If you run from a script, I guess you need a new secure connection. One of the things you're likely to need is that identity_file mentioned above.

    Post the full scp command line if you can.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2014
    Posts
    2
    Rep Power
    0
    Originally Posted by salem
    If you're running over ssh, then the secure connection is already made.

    If you run from a script, I guess you need a new secure connection. One of the things you're likely to need is that identity_file mentioned above.

    Post the full scp command line if you can.
    -------
    find xyz/mn*.* -type f -exec usr/local/bin/scp -Cp {} userid@server1:/abc/files

    When it reaches this step, job is failing
    In error log:
    ssh_askpass: (exec(usr/sbin/ssh-askpass)): No such file or directory

    Host key verification failed.


    How to and where to verify that file u have mentioned??
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,449
    Rep Power
    1751
    What is 'Auto sys' jil file?
    If something works manually and does not when automated I generally assume that a change in the running environment is the culprit. Is the automated job running as the same user with the same ENV settings?
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc
  8. #5
  9. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    857
    Rep Power
    388

    Wink


    Originally Posted by maheshbabu
    I've K shell script. It will ....
    .... What should i do to make it successful????
    I also reiterate: What is 'Auto sys' jil file?

    Try this:
    Make sure you set in "Auto sys" the same environment variables as when you execute in command line (PATH, Libraries, etc...)

IMN logo majestic logo threadwatch logo seochat tools logo