Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-21-2016, 03:19 PM
mwdenko's Avatar
mwdenko mwdenko is offline
Registered User
 
Join Date: Sep 2014
Location: Ohio
Posts: 32
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.
Reply With Quote
  #2  
Old 01-21-2016, 04:49 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
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?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 01-21-2016, 06:25 PM
mwdenko's Avatar
mwdenko mwdenko is offline
Registered User
 
Join Date: Sep 2014
Location: Ohio
Posts: 32
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.
Reply With Quote
  #4  
Old 01-22-2016, 08:27 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
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?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 01-22-2016, 09:27 AM
mwdenko's Avatar
mwdenko mwdenko is offline
Registered User
 
Join Date: Sep 2014
Location: Ohio
Posts: 32
That worked!
Reply With Quote
  #6  
Old 01-22-2016, 09:51 AM
mwdenko's Avatar
mwdenko mwdenko is offline
Registered User
 
Join Date: Sep 2014
Location: Ohio
Posts: 32
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.
Reply With Quote
  #7  
Old 01-22-2016, 11:18 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
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.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 11:15 AM.