Post a reply :: Support Forum

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Username
Subject
Message body
Options

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.


(max 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)
Options
 

Topic review

Author Message
martin
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
Rubble
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
martin 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
martin
Maxim wrote:
Is it possible to hide passphrase from log session events?

Thanks for the suggestion. Will try.
Maxim
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
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
Nicolas.Tsamis
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

Search

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