Topic "Unknown -passphrase switch in open command."

Author Message
Nicolas.Tsamis
[View user's profile]

Joined: 2014-12-27
Posts: 1
Location: Athens - Greece
Hi,
I am using the latest version of WinSCP 5.5.6 but I still have problem for the -passphrase switch to be recognized when using the open command. My scripting line is as follows and when I omit the passphrase switch and entering it manually everything works Ok. When I use the switch I get an error message "Unknown Switch". Documentation mentions that this is a feature of the latest version. Is 5.5.6 the latest version?

open sftp://secretboutique:secretboutique@secretboutique.gr/ -privatekey="C:\Bitway.ppk" -passphrase="xxxxx"

Please advise
Best Regards
Nicolas
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
The 5.5.6 is the latest stable version. The -passphrase is supported in the latest BETA version only.
See https://winscp.net/tracker/show_bug.cgi?id=816
Maxim

Guest


Hi,
Is it possible to hide passphrase from log session events?

Code:

. 2015-01-26 18:32:00.384 --------------------------------------------------------------------------
. 2015-01-26 18:32:00.384 Script: Retrospectively logging previous script records:
> 2015-01-26 18:32:00.384 Script: option batch on
< 2015-01-26 18:32:00.384 Script: batch           on       
< 2015-01-26 18:32:00.384 Script: reconnecttime   120       
> 2015-01-26 18:32:00.384 Script: option confirm off
< 2015-01-26 18:32:00.384 Script: confirm         off       
> 2015-01-26 18:32:00.384 Script: option reconnecttime 120
< 2015-01-26 18:32:00.384 Script: reconnecttime   120       
> 2015-01-26 18:32:00.384 Script: open "sftp://user@localhost:22" -hostkey="ssh-rsa 2048 aa:ss:dd:ff:gg:hh:ii:oo:ii:uu:yy:tt:rr:ee:ww:qq" -privatekey="key.ppk" -passphrase="Plain text" -timeout=15
. 2015-01-26 18:32:00.384 --------------------------------------------------------------------------


-passphrase="Plain text"
-passphrase="**********"

---
Best Regards
Maxim
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Maxim wrote:
Is it possible to hide passphrase from log session events?

Thanks for the suggestion. Will try.
_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
prikryl wrote:
Maxim wrote:
Is it possible to hide passphrase from log session events?

Thanks for the suggestion. Will try.

This request has been added to the tracker:
https://winscp.net/tracker/show_bug.cgi?id=1277
Rubble
[View user's profile]

Joined: 2016-04-13
Posts: 1
Location: UK
Hi,

When I use the -passphrase switch from the command line, it is not passed and I am still prompted to enter the passphrase manually. Any ideas?

winscp.com /command "open sftp://<username>@<host>.com/ -privatekey="C:\temp\ABC-TEST-Upload-PrivKey.ppk" -passphrase="<mypassphrase>"

! 2016-04-13 16:22:09.580 Authenticating with public key "rsa-key-1111111"
. 2016-04-13 16:22:09.580 Prompt (passphrase, "SSH key passphrase", <no instructions>, "Passphrase for key "rsa-key-1111111": ")
. 2016-04-13 16:22:19.589 Disconnected: Unable to authenticate

I'm using 5.7.7.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Your syntax is wrong.

It should be:
winscp.com /command "open sftp://<username>@<host>.com/ -privatekey=""C:\temp\ABC-TEST-Upload-PrivKey.ppk"" -passphrase=""<mypassphrase>"""

See https://winscp.net/eng/docs/commandline#syntax
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License