SSH with RSA keys - error contacting the authentication agent

Hi all,

Basic Requirement:
To SFTP large files (usually 10GB). We use webMethods 6.1.2 (installed on Unix) as the orchstrator and make underlying Unix system calls to do the processing.
That is, if we have to SFTP a large file - webMethods will invoke a Perl script on the underlying Unix system and the Perl script inturn makes two things:

  1. Connect to the SFTP server (using the Unix system command "sftp user@hostname") and get the "sftp>" prompt
  2. Transfer the file (using the command "put filename")

Additional Requirement:
We use the RSA based passwordless authentication method provided by SSH/SFTP. We manually create a RSA pub-pvt key pair using "ssh-keygen" command and store the public key in the remotehost's ".ssh/authorized_keys" file. While the pvt key is added to the "ssh-agent" on the localhost using the "ssh-add filename" command. More on this can be found at: SSH and ssh-agent and OpenSSH Manual Pages

Problem:
All the above had been working until the past few days. But there seems to have been some Unix env change because of which when webMethods calls the Perl script to do the sftp, it cannot contact the SSH Agent to get the pvt keys. There are several SSH Agents running in the system but the value of "SSH_AGENT_PID" is not available to the Perl script - because of which it cannot do a passwordless authentication with the remotehost. When we run the same script directly in Unix it succeeds but when webMethods calls this script it doesnt. When I run the "set" command through webMethods it doesnt have any Env Variables unlike when I run "set" command in Unix directly it gives me the variable list which has the value of "SSH_AGENT_PID" set.

Would appreciate greatly if we could get any inputs/help which could solve this issue. Possibly we may be doing something wrongly or missing something. But just to add - it all worked perfectly just a few days ago!

Rgds,
Sandeep

Some Possibilities:

somebody ran ssh-keygen and made new keys in the local directory

there was a change - almost any sort of change -
on the other side
changed protections on the remote directories
ip address change on the remote server
on this side
changed directory protections

If you ask around people will say 'nothing was changed' but something had to have changed.

Thanks for your response.

But there is no change in the remotehost. And when I login directly from Unix using the same user it works well. But when the webMethods (runs as a process with parent id as '1' - if at all that helps) tries to run the same script it fails. webMethods cant even get any value for the SSH_AGENT_PID so it cant connect to the ssh-agent. Now is there something obvious I'm missing?