Logging in via script and parsing ppk key.

Advertisement

SteveF
Joined:
Posts:
3
Location:
London, UK

Logging in via script and parsing ppk key.

Hi

I'm extremely new to this so if I'm asking silly questions do excuse me, although I have spent considerable time trying to resolve this personally.
I am writing a script to eventually get several sets of files daily. I am writing and testing the script bit by bit but unfortunatly I have not even managed to logon succussfully yet :oops: . The logon requires the parsing of a ppk key. So far I have written in format of below:

option batch on

option confirm off

open sftp_USER:PASSWORD@123.45.67.89:22 -privatekey=C:\Private.ppk

But when I run this I am getting the message:

Too many parameters for command 'open'

Any help would be fantastic - I have scoured the winscp site but can find nothing of any real help, I have tried using the / switch instead of - to define the parsing of the private key but it seems I'm confused on the simplest of fundamentals....

Best
Steve

Reply with quote

Advertisement

SteveF
Joined:
Posts:
3
Location:
London, UK

Hi Guys,

I know I can login with the following

open sftp_USER:PASSWORD@123.45.67.89:22

But then how do you parse the ppk key after?

Thanks
Steve

Reply with quote

SteveF
Joined:
Posts:
3
Location:
London, UK

No worries guys I have found the problem, my version of Winscp is older and does not recognise switches

Reply with quote

Advertisement

You can post new topics in this forum