How can I include private key in the open command

Advertisement

hputumbaka@...
Guest

How can I include private key in the open command

I would like open a new session using the private key
ex:
open username:password@domainname.com
I don't see an option to include private key in the above command, I would like to automate the script I do not want to use GUI. I would appreciate if some can reply me. thank you.

Reply with quote

Advertisement

why
Guest

Too much parameter

Why! I'm using in script .txt
open sftp://<user>@<host> -privatekey=<privatekey Name>.ppk
It errors
Too many parameters for command 'open'.

Reply with quote

Advertisement

Pradip Kumar Nayak
Guest

Getting Error like [Too many parameters for command 'open']

Hi,
I am using WinSCP version 4.2.8.
When I execute the attached script file I got an error message
Too many parameters for command 'open'
Please help me to execute the script.
Thank you in advance.

Regards, Pradip

Reply with quote

barencibia
Guest

Re: Too much parameter

It is required to pass the path between double quotes -privatekey="..."
Try something like this:
open <username>@<sftp.server> -privatekey="<path-to-your-ppk-file>"

Reply with quote

Advertisement

You can post new topics in this forum