0

I'm writing a batch file that runs the below command

winscp sftp://username:password@host.com:22 /privatekey=pgp530.ppk

The output is as follows

Searching for host... Connecting to host... Authenticating... Using username "username". Authenticating with public key "imported-openssh-key". Passphrase for key 'imported-openssh-key':

Is there any way to have the batch file enter the passphrase when prompted? Thanks!

Eric Speelman
  • 1,102
  • 2
  • 10
  • 11

1 Answers1

1

Why not just create a private key without a password, or remove the password from the private key?

It'll be roughly as secure as passing in a plain-text password to the key.

Community
  • 1
  • 1
mopsled
  • 8,445
  • 1
  • 38
  • 40