Topic "Winscp Script for wth passphrase"

Author Message
mrashid
[View user's profile]

Joined: 2015-12-20
Posts: 2
Hello all
Need urgent help
i need to transfer the file to remote (UNIX) server , authentication is through the PPK with passphrase,
i have pageant running and added the key , and in current session batch file is working,
however when i run as batch file thru scheduler it is not working,and it is executing with the same user added the key pageant, and it is asking key to add it in pageant everytime it is login.

has any body done the automation , if yes please share the ideas at the earliest
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
You are not supposed to use Pageant for authentication. That's not it's purpose.

Use the private key file explicitly.

Anyway, see https://winscp.net/eng/docs/faq_scheduler
mrashid
[View user's profile]

Joined: 2015-12-20
Posts: 2
hi

(using -privatekey and -passphrase switches)
-passphrase switch is not working , i have download 5.7.6
could you provide the sample script , so it will help in automation script


prikryl wrote:
You are not supposed to use Pageant for authentication. That's not it's purpose.

Use the private key file explicitly.

Anyway, see https://winscp.net/eng/docs/faq_scheduler
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
knowme

Guest


I was able to get this to work with the current version (5.7.4), without the need for the -passphrase switch. This is used in a batch script, and the passphrase is passed to winscp using the echo command:

echo yourpassphrase|winscp /command "option confirm off" "option transfer binary" "open sftp://username:password@server.com -privatekey=C:path\privatekey.PPK" "cd /out" "get testfile*" "exit"


Hope this helps,

Matt
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