Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Many Many THANKS!!! It works now!
Searched hours trough the FAQ and Forum, but did not notice this hint.

I'm not allowed to change Keys. It is a customer managed enviroment with limited access for me.

Re: Problem with Passphrase option in Script

You have to double the double quotes:


Though in general, I do not see what is complicated about re-saving your private key with more sensible passphrase. Just load your key to PuTTYgen, change the passphrase and save it back.

I read about Pageant already, but as this is a customer environment, it is not so easy to install a new software.
So I would prefer a solution without additional software if possible. Maybe there is any way I could pass my Passphrase trough the -passphrase option.

In fact, that was my initial assumption...

I can't change the password on my own, it is really complex to do so. If it was this easy, I would do that already.

Tried also Encoding like in Password field, but it seems this is not possible in Passphrase field.


Most likely that you chose you use double quotes inside a double quoted string.

100% of the times it's better to not have password that contains certain characters, like single or double quotes or ending in an escape character.

Use a password with no quotes or escape them. See how that goes.

Problem with Passphrase option in Script

I have created a script using Private Key Files. Also using the -passphrase option. But my Passphrase isn't working. I suggest it is a problem with special characters.

Passphrase: My,P%=!#"a$=k"-5,2"23'"phase
This is an example with same special characters as the original.

Is there any way I could automate my script without changing the Passphrase (not possible for me).

option batch on
option confirm off
open sftp://username@ -hostkey="ssh-rsa 2048 xyzwvIj/Gsk48njdh6geGF6uXwqAtnfgMV7qUPy202w" -privatekey="D:\Pfad\priv.ppk" -passphrase="My,P%=!#"a$=k"-5,2"23'"phase"
lcd D:\Pfad\Import
cd home
cd data
get file.txt

If I use the Script without -passphrase option and enter the Passphrase manually when asked for, it works.