Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-14-2016, 12:47 PM
svsu9033 svsu9033 is offline
Registered User
 
Join Date: May 2016
Posts: 5
SFXCL - Use of Session with Passphrase

I've been digging through documentation and cannot figure out how to make the following work. I have process where I will use SFXCL to retrieve files. I've built a Session and would like to use PublicKey Authentication. When I build the command line using the /S option along with the /P option, it does not work.

the Public key is on both servers. I can successfully test connecting with the Passphrase using SecureFX. I can't make the command line work.

Here's an example of the command line I'm trying to use: SFXCL.exe /MOVE /AcceptHostKeys /Overwrite always /LOG "%SFTP_LOG%" /S /%SFTP_SESSION% /P /%SFTP_PASSPHRASE %SFTPPath_ToLocal%\*.csv %IMPORT_LOCAL_SENTFILESLOG_DIR%

Any and all help is most appreciated!

Thanks!
Reply With Quote
  #2  
Old 05-15-2016, 11:59 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hello svsu9033,

Quote:
I can't make the command line work.
In what way does it not work? Do you get an error message? Authentication does not succeed?

For one thing, your syntax is not correct. In SFXCL command-lines, you don't ever put options between source and destination. /P is an option. All options come after calling SFXCL and *before* source/destination. A malformed command-line may work, but it's not a good idea.

sfxcl [options] source destination

You also do not need a / in front of the actual passphrase (only in front of the option, /P). In your case, it would be:

SFXCL.exe /MOVE /AcceptHostKeys /Overwrite always /LOG "%SFTP_LOG%" /P %SFTP_PASSPHRASE /S /%SFTP_SESSION% %SFTPPath_ToLocal%\*.csv %IMPORT_LOCAL_SENTFILESLOG_DIR%

If the revised syntax still fails, please send the log file as an attachment to an email to support@vandyke.com. In the subject line, please include "Attn Brenda - Forum Thread #12354".
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 05-16-2016, 07:45 AM
svsu9033 svsu9033 is offline
Registered User
 
Join Date: May 2016
Posts: 5
SFXCL - Use of Session with Passphrase

Brenda,

Thanks for the reply.

I found another thread which indicated I should also include the Identity in my command.

After working on it for a while, I now have the following working:

SFXCL.exe /MOVE /AcceptHostKeys /Overwrite always /LOG "%SFTP_LOG%" /I %SFTP_IDENTITY% /P %SFTP_PASSPHRASE% /S /%SFTP_SESSION% %SFTPPath_ToLocal%\*.csv %IMPORT_LOCAL_SENTFILESLOG_DIR%

If %SFTPPath_ToLocal% is a drive on the server I'm connecting to with the Session, the command works great. However, it needs to be a NAS location I access via the Session server. I have the UNC to the NAS but can't make it work at the moment. Any ideas or should I start another thread?

Thanks,
geoff
Reply With Quote
  #4  
Old 05-16-2016, 07:54 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hi Geoff,

I am glad to hear you have made progress. By the way, you can configure the session to use the "identity file" and then you do not have to include that reference on the command-line.

For the new issue, what do you mean by "can't make it work"?

Does the file transfer fail?

Does the entire connection fail?

Again, I would need to see the SFXCL log file to assist.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 05-16-2016, 08:56 AM
svsu9033 svsu9033 is offline
Registered User
 
Join Date: May 2016
Posts: 5
SFXCL - Use of Session with Passphrase

Brenda,

I removed the /I and tried again executing the command within my process. This time it worked without it and must have picked up the key location from my Session. Not sure what I did Saturday. Could have been an ordering issue.

Regarding my attempting to connect to a NAS location via UNC, here are the details.

The destination passed into the MOVE command is: \\server122\projectfolder\processfolder\*.csv

My log indicates the following:
2016-05-16 10:47:57, 00001: Session(00000001): Transfer(00000001): SEND : RealPath, path=//server122/projectfolder/processfolder/
2016-05-16 10:47:57, 00001: Session(00000001): Transfer(00000001): SEND : change-path=//server122/projectfolder/processfolder/
2016-05-16 10:47:58, 00001: Session(00000001): Transfer(00000001): RealPath failed (0x00000002): The system cannot find the file specified.

2016-05-16 10:47:58, 00001: Session(00000001): Transfer(00000001): SEND : RealPath, path=//server122/projectfolder/processfolder/
2016-05-16 10:47:58, 00001: Session(00000001): Transfer(00000001): SEND : change-path=//server122/projectfolder/processfolder/
2016-05-16 10:47:58, 00001: Session(00000001): Transfer(00000001): RealPath failed (0x00000002): The system cannot find the file specified.

Is there a trick I'm not aware of? Is the destination not in the proper format?

Any and all assistance is most appreciated.

Thanks,
geoff
Reply With Quote
  #6  
Old 05-16-2016, 09:44 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hi Geoff,

How is that storage device accessed from the remote system when you connect with SecureFX?

Do you just type that UNC path in the address bar?

I need a complete log file from the beginning of the connection (including SFXCL command-line) and I recommend you send it via email as previously posted.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #7  
Old 05-16-2016, 11:29 AM
svsu9033 svsu9033 is offline
Registered User
 
Join Date: May 2016
Posts: 5
SFXCL - Use of Session with Passphrase

Brenda,

Sent email containing messaging received when attempting to navigate to the network location via UNC in SecureFX.

Thanks,
geoff
Reply With Quote
Reply

Tags
sfxcl

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 12:34 PM.