Easy Pass to Secure File Transfer
TM
»User: »Password:   Remember Me? 
Sysax Product Forums / Sysax FTP Automation / Bugs and Feature Requests / pkeyload question
Posted:  08 Nov 2008 06:21
Attachment: ccna_rsa_key.pem (0 kb); public_ccna_rsa_key.pem (0 kb) 
First time using this command:
pkeyload "C:keysccna_rsa_key.pem","Clarks"
What would cause this error?
Here are the commands we used as well as the keys

# Create the private key

openssl genrsa -out ccna_rsa_key.pem -des3 1024

#Create the public key

openssl rsa -pubout -in ccna_rsa_key.pem -out public_ccna_rsa_key.pem

Thanks
Posted:  08 Nov 2008 06:24   Last Edited By: sysaxsupport
I am not able see your description of the error in the support ticket. Can you send us the error message from the program?



------------------------------------------------
File Transfer Software Solutions
Posted:  08 Nov 2008 06:27
Here is the log from the execution.....

Script Engine: Line 23: Executing waitsecs. Parameter(s): 10
Script Engine: Line 19: Executing pkeyload. Parameter(s):
"C:keysccna_rsa_key.pem" ""
Script Engine: Line 23: Executing waitsecs. Parameter(s): 10
Script Engine: Line 19: Executing pkeyload. Parameter(s):
"C:keysccna_rsa_key.pem" ""
Script Engine: Line 23: Executing waitsecs. Parameter(s): 10
ERROR: PKEYLOAD command failed
Script Engine: Line 36: Executing setexitcode. Parameter(s): 1
Script Engine: Script execution complete
Script completed with an exit code of 1
I've also attached the script that I am using. Do you need anything
else?
Thanks
Posted:  08 Nov 2008 06:29   Last Edited By: sysaxsupport
Look like there is really no error. The ftpresult command stores the status of commands that begin with "ftp". So the call to pkeyload cannot set the value of the ftpresult flag. The ftpresult flag is initially set to indicate failure and this is what you are reading back. You should simply comment out lines 34 to 38.


------------------------------------------------
Large File Transfer Solutions
Posted:  08 Nov 2008 06:32
I tried that now and this is what I get:
Executing script C:SYSAXFTPAutomationscriptsBofALockbox.fscr
Script Engine: Line 18: Executing pkeyload. Parameter(s):
"C:keysccna_rsa_key.pem" ""
Script Engine: Line 31: Executing ftpconnectssh. Parameter(s):
"elink-sshftp.bankofamerica.com" 22 "CJ660CAO" (not displayed)
ssh-userauth
could not open private key file
An error occured during key exchange

The new script is attached.
Thanks
Posted:  08 Nov 2008 06:35   Last Edited By: sysaxsupport
The error is related to loading the public key file and indicates one of the following errrors:
- the path to the location of the keyfile has a type
- the private key is protected by a passphrase in which case the passphrase must also be

provided to the pkeyload command
- the private key file does not contain a private key or is corrupt
In your case, since you generate the private key with the -des3 option ie. openssl genrsa -out

ccna_rsa_key.pem -des3 1024 the private key looks like it is password protected and you need to

specify the passphrase to the pkeyload command. Otherwise you can try generating the private key

without the -des3 option.



------------------------------------------------
Automate FTP the easy way
Posted:  08 Nov 2008 06:36
I checked things out and made a couple of changes. Looks like we are getting a little further.

Here is the
latest issue:

Executing script C:SYSAXFTPAutomationscriptsBofALockbox.fscr
Script Engine: Line 18: Executing pkeyload. Parameter(s):
"C:keysccna_rsa_key.pem" "clarks"
Script Engine: Line 31: Executing ftpconnectssh. Parameter(s):
"elink-sshftp.bankofamerica.com" 22 "" (not displayed)
ssh-userauth
An error occured during key exchange
Posted:  08 Nov 2008 06:38
Good to hear that you got past the key loading issues. For this one, the fastest possible way to resolve this is to have one of our developers try to login to the server with the same key and debug the problem. Is this a test account or can we get a test account with this server?
Posted:  08 Nov 2008 06:40
I haven't had been able to spend much time on this yet today. Let me get back to you. I was a

little confused with the requirements from Bank of America(BOA). They sent me their host public

key in an email that I missed. BOA's SSHFTP server supports automatic retrieval of their host

public key. Not sure what that means. Is there a command in the Sysax software to send this key back for authentication?

The Bank server's public key would be downloaded during the key exchange process every time a ssh connection is established. I am not cliear what they mean by automatic retrieval. We will need more information from the Bank's sys admin on this.
 

Copyright © 2008 Codeorigin, LLC - All Rights Reserved.
XML RSS 2.0 XML Atom 1.0