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 dont 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

Guest

Re: how can i include private key in the open command

martin wrote:

You have several options:

using the private key option, how do you call the script file?
what is the syntax or is this even possible?
How do I get and put files out there using private key option?

Reply with quote

martin
Site Admin
martin avatar

Re: how can i include private key in the open command

In the latest version you have one more option, to use -privatekey switch with "open" command.

Reply with quote

why
Guest

Too much parameter

why! i using in script .txt

open sftp://<user>@<host> -privatekey=<privatekey Name>.ppk

it's error : Too many parameters for command 'open'.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
38,686
Location:
Prague, Czechia

Re: Too much parameter

why wrote:

why! i using in script .txt

open sftp://<user>@<host> -privatekey=<privatekey Name>.ppk

it's error : Too many parameters for command 'open'.
You are probably using an old version of WinSCP. The parameter is supported since 4.1.x only.

Reply with quote

Guest

Hello,

i am using winscp 4.2.7, and I still get the same error message. Could any one advise what is the correct command? what shall I do?

Thanks

Reply with quote

martin
Site Admin
martin avatar

Anonymous wrote:

i am using winscp 4.2.7, and I still get the same error message. Could any one advise what is the correct command? what shall I do?
Post an example of the command you are using.

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 excute the attached script file i got an error message
[Too many parameters for command 'open'].

Please help me to excute the script.
Thank you in advance.

Regards,
Pradip

Reply with quote

Guest

Re: Too much parameter

martin wrote:

why wrote:

why! i using in script .txt

open sftp://<user>@<host> -privatekey=<privatekey Name>.ppk

it's error : Too many parameters for command 'open'.
You are probably using an old version of WinSCP. The parameter is supported since 4.1.x only.


!!!!!!!!!!!finaly found somebody who can help !!!!!!!!!!!!!!!! thanks

Reply with quote

Advertisement

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