Sponsored Content
Top Forums UNIX for Dummies Questions & Answers SSH with RSA keys - error contacting the authentication agent Post 302275493 by sandeeppotdar on Saturday 10th of January 2009 07:08:15 PM
Old 01-10-2009
Question 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
 

10 More Discussions You Might Find Interesting

1. IP Networking

Windows98 RSA/Ace agent

I run windows98 but need to use the ACE agent to VPN in to the work network anyone know where i can download it ? RSA don't have it on they're site any ideas ????? loosing out on "call out" dosh (2 Replies)
Discussion started by: kie
2 Replies

2. UNIX for Advanced & Expert Users

ssh RSA authentication failure

I am using an ssh pub key on two remote servers to allow ssh session without authentication. Both servers have the same id_rsa.pub copied from the host into the remote servers ~user/.ssh/authorized_keys. There is no passphrase for this key either. The problem is that I am able to ssh into one... (2 Replies)
Discussion started by: prkfriryce
2 Replies

3. Shell Programming and Scripting

RSA keys are not working

Hi, We have two open SSh systems(Let us assume that A and B).These systems are having the non expiring passwords. We established a passwordless connection between two systems bu using the rsa key iles. I have created the key generated files by using the command ssh-keygen -t rsa in system A and... (1 Reply)
Discussion started by: srrao.ch
1 Replies

4. UNIX for Advanced & Expert Users

RSA keys are not working

Hi, We have two open SSh systems(Let us assume that A and B).These systems are having the non expiring passwords. We established a passwordless connection between two systems bu using the rsa key iles. I have created the key generated files by using the command ssh-keygen -t rsa in system A and... (1 Reply)
Discussion started by: srrao.ch
1 Replies

5. Linux

RSA Keys root account problem?

I have set up RSA private and pub keys between "NodeA" and "NodeB" Everything works fine when I test with a regular user account. However it does not work as root. I followed the same procedure to set up the keys as the root user but I am still prompted for a password. I have verified my... (1 Reply)
Discussion started by: geek4lif
1 Replies

6. Shell Programming and Scripting

Encrypt/Decrypt string with rsa keys

Hello, I wanted to know if there was a way to encrypt a string, not a file using openssl and then decrypt it? I cant seem to get it to work. This is what I have been trying but I'm not having much luck. encTxt=`echo "$1" | openssl dgst -sha1 -binary | openssl rsautl -sign -inkey... (1 Reply)
Discussion started by: tjones1105
1 Replies

7. UNIX and Linux Applications

Running RMAN backups from grid control but using oracle account with rsa keys vs a password ?

I'm a sysadmin trying to help out one of our DBA's setup the RMAN backups (Oracle 11g on rhel5 ) so they can schedule and control them from the OEM grid control. But we want the oracle user to use ssh keys instead of a password. I have the working rsa keys in place for the user but the GUI seems to... (0 Replies)
Discussion started by: samael00
0 Replies

8. Shell Programming and Scripting

Password-less RSA Authentication not working

Hello Friends, I know this issue has been raised many times and hence I tried every resolution provided in the forum before I posted this issue again. My Password-less RSA authentication was working fine for quite some time. Whenever the remote server password used to change I used to re-do... (5 Replies)
Discussion started by: mehimadri
5 Replies

9. UNIX for Dummies Questions & Answers

SSH Keys Authentication keeps asking for password

Hi! Im trying to set access from ServerA(SunOS) to ServerB(Some custom Linux with Keyboard Interactive login) with SSH Keys. As a proof of concept I was able to do it between 2 virtual machines. Now in my real life scenario it isnt working. I created the keys in ServerA, copied them to... (7 Replies)
Discussion started by: RedSpyder
7 Replies

10. UNIX for Dummies Questions & Answers

[SSH-RSA] Still prompting for password after generating keys

Hello, I'm trying to perform these operations without entering any password, as user "fzd":fzd@machine1> scp /tmp/srcFile1 fzd@machine2:/tmp/$destFile fzd@machine1> scp fzd@machine2:/tmp/$srcFile /tmp/$destFilebut alsofzd@machine1> scp /tmp/srcFile1 machine2:/tmp/$destFile fzd@machine1> scp... (6 Replies)
Discussion started by: fzd
6 Replies
SSH-COPY-ID(1)						      General Commands Manual						    SSH-COPY-ID(1)

NAME
ssh-copy-id - install your public key in a remote machine's authorized_keys SYNOPSIS
ssh-copy-id [-i [identity_file]] [user@]machine DESCRIPTION
ssh-copy-id is a script that uses ssh to log into a remote machine and append the indicated identity file to that machine's ~/.ssh/autho- rized_keys file. If the -i option is given then the identity file (defaults to ~/.ssh/id_rsa.pub) is used, regardless of whether there are any keys in your ssh-agent. Otherwise, if this: ssh-add -L provides any output, it uses that in preference to the identity file. If the -i option is used, or the ssh-add produced no output, then it uses the contents of the identity file. Once it has one or more fin- gerprints (by whatever means) it uses ssh to append them to ~/.ssh/authorized_keys on the remote machine (creating the file, and directory, if necessary.) NOTES
This program does not modify the permissions of any pre-existing files or directories. Therefore, if the remote sshd has StrictModes set in its configuration, then the user's home, ~/.ssh folder, and ~/.ssh/authorized_keys file may need to have group writability disabled manu- ally, e.g. via chmod go-w ~ ~/.ssh ~/.ssh/authorized_keys on the remote machine. SEE ALSO
ssh(1), ssh-agent(1), sshd(8) OpenSSH 14 November 1999 SSH-COPY-ID(1)
All times are GMT -4. The time now is 06:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy