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 10-05-2015, 02:07 PM
Bob Bob is offline
Registered User
 
Join Date: Oct 2015
Posts: 5
Request passphrase twice

Hello,

I have this command :

SFXCL /Q /Log 'D:\Log20151005150316.log' /P 'passphrase' \\bob\file.txt SFTP://user@bob.com:/RepUpload

Even if I specify the passphrase in the command, if the windows application is not open, he request another time the passphrase.

Why ?
Reply With Quote
  #2  
Old 10-05-2015, 02:21 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,019
Hi Bob,

You have not actually pointed to a specific key file via your command-line. Have you configured Default Session with a key file for public-key authentication?

If not, if you add /I "path_to_key_file" to your command-line, what are the results?

SFXCL /Q /Log 'D:\Log20151005150316.log' /I "path_to_key_file" /P 'passphrase' \\bob\file.txt SFTP://user@bob.com:/RepUpload


By the way, what version of SecureFX are you using?

Please note that if it is SecureFX v7.3.3 or later, we added this functionality:

Changes in SecureFX 7.3.3 (Official) -- March 31, 2015
------------------------------------------------------

New features:

  • Previous versions of SecureFX supported saving passwords and other sensitive data. In order to improve the security of this feature, SecureFX now requires a passphrase to be created the first time version 7.3.3 runs. This passphrase will be used to encrypt and decrypt sensitive data stored in the session database.
Are you sure the prompt is not for the *config passphrase*?

SFXCL cannot work if a config passphrase is set.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 10-06-2015, 10:23 AM
Bob Bob is offline
Registered User
 
Join Date: Oct 2015
Posts: 5
I've remove the config passphrase but he still prompt me to enter the passphrase. But if I have the application open with the connection open, he dont prompt me for the passphrase.

I've the latest version of SecureFX. I try to do a transfert via a powershell on windows.
Reply With Quote
  #4  
Old 10-06-2015, 10:28 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,019
Hi Bob,

It's very important that *all instances* of SecureFX and SFXCL be closed prior to attempting removal of the config passphrase. Did you verify all instances of both applications were closed?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 10-06-2015, 10:39 AM
Bob Bob is offline
Registered User
 
Join Date: Oct 2015
Posts: 5
Ok.

I've made a little try. I've copy the line in the DOS command prompt and it work well. Then I must deduct it's the way I call it in powershell.

I build each argument in variable and call it. Like this :

[string]$CMD = 'SFXCL'
[string]$arg1 = '/Q'
[string]$arg2 = '/Log ' + $CheminLog + '\Log' + $(get-date -f yyyyMMddHHmmss) + '.log'
[string]$arg3 = '/I ' + $CheminClePrive
[string]$arg4 = '/P ''' + $Passphrase + ''''
[string]$arg5 = '/F ' + $CheminConfigSecureFX
[string]$arg6 = '\\' + $Serveur + $CheminFichier + $fichier
[string]$arg7 = 'SFTP://' + $UserCCD + '@' + $HostaddressCCD + ':/' + $RepertoireCCD

# The call
& $CMD $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7

How can I call it to work ?
Reply With Quote
  #6  
Old 10-06-2015, 11:10 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,019
Sorry, Bob, I am not a PowerShell expert.

I can tell you this SFXCL syntax is valid, but you already know that from your Windows command shell test:

Code:
SFXCL /Q /Log "some log file path" /I "path to key file" /P "passphrase" /F "path to alternate config" \\fileserver\sourcefile.txt sftp://user@host:/someremotedirectory

It's likely you could have missed escaping some special character.

Are you getting an error?

If so, what is it?

Troubleshooting PowerShell is outside the scope of SecureFX support, but if you post it, maybe the user community can help.
__________________
Thanks,
--Brenda

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

Tags
passphrase , scripting


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 06:37 PM.