VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   Scripting (https://forums.vandyke.com/forumdisplay.php?f=14)
-   -   host key file (https://forums.vandyke.com/showthread.php?t=12210)

mwdenko 01-21-2016 04:19 PM

host key file
 
I'm trying to run a script for a client. When I run in the GUI I can use the host key file and login just fine. It seems when I'm scripting it will not find the PVT file.

I've tried the /f without success.

Thanks in advance!

Code:

"C:\Program Files\VanDyke Software\SecureFX\sfxcl.exe" /Move /NOPROMPT /OVERWRITE always /TRANSFERTYPE binary /RETRYCOUNT 0 /ACCEPTHOSTKEYS  /LOG C:\*******_SFTP\Log\Download_20160121171046.txt ftps://User:**************@ftp.something.net//User/Outbound/999/*.* C:\********_SFTP
2016-01-21 17:10:46, 00001: sfxcl version 7.2.6.606 (Official Release - August 19, 2014)
2016-01-21 17:10:46, 00001: Session 00001 established for transfer from ftps://User:**************@ftp.something.net//User/Outbound/999/*.*
2016-01-21 17:11:07, 00001: Control connection could not be established.
2016-01-21 17:11:07, 00001: (0x2746) An existing connection was forcibly closed by the remote host.


rtb 01-21-2016 05:49 PM

Hi mwdenko,

You are using FTPS for the protocol. The SFXCL /F command-line option doesn't have any bearing on the Windows certificate store or the Windows user context. SecureFX/SFXCL uses the Windows certificate store to validate the server's certificate when using the FTPS protocol. You will need to make sure that the Windows user context that is being used to run SFXCL has the correct certificate in the Windows certificate store so that SFXCL can validate the certificate that the remote server is presenting.

Does this help you solve the connection problem?

mwdenko 01-21-2016 07:25 PM

Thanks for the quick response!


I'm not sure I follow. When I run using the SecureFX program I can get in and download files.

When I script it I don't get any further than the initial connection.

the /f was just a SWAG after reading some of the posts on the forum.

The same windows user is logged in for both attempts.

rtb 01-22-2016 09:27 AM

Hi mwdenko,

Thanks for the update. Based on the new information, it isn't clear from the SFXCL log file why the connection is failing.

Since you are successful when using SecureFX, I would suggest using the session that you have with SFXCL. For example:
sfxcl /S "session name" /User/Outbound/999/*.* C:\********_SFTP
Does this help you successfully connect when using SFXCL?

mwdenko 01-22-2016 10:27 AM

That worked!
:)

mwdenko 01-22-2016 10:51 AM

One more question. How do I pass the password in this instance?

I had the GUI open when I tested and it went right through and connected.

I closed the GUI and now it won't connect.

rtb 01-22-2016 12:18 PM

Hi mwdenko,

My guess is that you haven't saved the password in your SecureFX session.

If you connect using SecureFX and save the password in the session, do you get better results using SFXCL while SecureFX is closed?

I only suggest saving the password in the session because you are using FTPS and the alternative is to pass the password in plaintext on the command-line or try and configure mutual authentication if the server supports it. At least the password will be encrypted in the session.

If you are going to save passwords, it is also advisable to upgrade to the current official release which is 7.3 and soon to be 8.0. They use a different algorithm to encrypt the saved password than 7.2.

If you have the ability to use SFTP, you could use publickey authentication which wouldn't require saving a password.


All times are GMT -6. The time now is 12:52 AM.