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

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

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

You have several options:

Reply with quote

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
Joined:
Posts:
27,253
Location:
Prague, Czechia

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.
_________________
Martin Prikryl

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

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
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.
_________________
Martin Prikryl

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
Joined:
Posts:
27,253
Location:
Prague, Czechia

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.
_________________
Martin Prikryl

Reply with quote

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

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

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

Pradip Kumar Nayak wrote:

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'].
Pleaase read FAQ:
https://winscp.net/eng/docs/faq_script_switch
_________________
Martin Prikryl

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

You can post new topics in this forum