Correct syntax with privatekey=

Advertisement

jsb2210
Joined:
Posts:
11

Correct syntax with privatekey=

I have a private key file that is not working by command line. After typing below, I get asked for a password. There is no password, just username and key. What is wrong ?

open "sftp://username@10.10.10.10/ -privatekey=""D:\SFTP\Prod\ServerKey\private.ppk""

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Correct syntax with privatekey=

This is the correct syntax:

open "sftp://username@10.10.10.10/" -privatekey="D:\SFTP\Prod\ServerKey\private.ppk"

Though you actually need no quotes in this case, as there's no space in either argument.

Reply with quote

Advertisement

You can post new topics in this forum