#1
|
|||
|
|||
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 ? |
#2
|
|||
|
|||
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:
SFXCL cannot work if a config passphrase is set.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
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. |
#4
|
|||
|
|||
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 |
#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 ? |
#6
|
|||
|
|||
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 |
#7
|
|||
|
|||
In fact, I have two type of message :
Invalid argument specified for command line option '/Log D:\Log20151006132248.log'. And if I remove the log parameter, I have this error : Copying local files is not supported. I will try some other way to launch SecureFx Thanks |
#8
|
|||
|
|||
Hi Bob,
I think you have forgotten leading (or trailing) spaces when assigning the info to variables. In my tests, I did get errors if the assigned variable started with '/Option', because when you run the PowerShell statement: Code:
# The call & $CMD $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7 So each variable assignment will likely need a leading or trailing space to separate the SFXCL options: Code:
[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
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#9
|
|||
|
|||
I've change the way I call it and it work.
In place of "& $CMD $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7" I proceed like this "cmd.exe /c "$CMD $argTotal" where $argTotal is the total of each $arg (1...7). Not the best but it work for me. |
#10
|
|||
|
|||
Hi Bob,
Great, I am glad to hear you found a workaround. Thanks for posting an update! ![]()
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Tags |
passphrase , scripting |
Thread Tools | |
Display Modes | Rate This Thread |
|
|