Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
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)

Options

Topic review

ShawnHenry

remove password protection from ppk file

hey,all
actually i got the exactly same problem just now. but luckily i found out why. the error was called "couldn't load private key(unable to open file) ", mainly this is because of no permission to open file in that folder. thus i moved this file out and its working. hence please make sure whether you have absolutely right or not in that folder and then if doesn't work either please try to move this file out in somewhere
martin

Re: removing password from ppk private key

sebastjan wrote:

I have a similar problem with scripting and passphrase protected private key, but I don't know how to remove the password!? Can you please tell me, how to do that?

Load it into the puttygen, remove the passphrase, and save it.
sebastjan

removing password from ppk private key

Hello!
I have a similar problem with scripting and passphrase protected private key, but I don't know how to remove the password!? Can you please tell me, how to do that?

Thank you
Sebastjan


jjeffers wrote:

martin wrote:

Why? Do you know how to remove the password protection?

I know how to do it, but you know how it is with these kinds of things. If they discover that I've deviated from their requested security, there could be problems.

I did remove the password and test it, and it works fine, so I'll run it by them and see if it'll fly. Thank you for the help!
jjeffers

martin wrote:

Why? Do you know how to remove the password protection?

I know how to do it, but you know how it is with these kinds of things. If they discover that I've deviated from their requested security, there could be problems.

I did remove the password and test it, and it works fine, so I'll run it by them and see if it'll fly. Thank you for the help!
martin

jjeffers wrote:

So, I'm out of luck then?

Why? Do you know how to remove the password protection?
jjeffers

martin wrote:

jjeffers wrote:

Unfortunately I don't have that option. The owners of the server I'm connecting to require a password protected key.

Just do not tell them :-)

:lol:
So, I'm out of luck then?
martin

jjeffers wrote:

Unfortunately I don't have that option. The owners of the server I'm connecting to require a password protected key.

Just do not tell them :-)
Really, it does not make sense to protect the key used for automation, as you need to provide the password automatically somehow anyway. So what's the point?
jjeffers

Unfortunately I don't have that option. The owners of the server I'm connecting to require a password protected key.
martin

Re: Scheduling a script, password-protected PPK

Just remove the password protection from the key.
jjeffers

Scheduling a script, password-protected PPK

I have read the docs and the FAQ, but I couldn't find an answer to this. My apologies if I missed it.

I'm connecting to a server that uses a password-protected private key file. I have created a batch file that runs a winscp script, and I use Pageant to store the key so I don't get prompted for the password. This all works fine if I run the batch file from the shell. However, it seems to hang when I run it as a scheduled task, even though I'm using the same user context when I run the scheduled task.

I can't see what's going on with the scheduled task, but my guess is that it's unable to get the private key info from Pageant, and is waiting for a password.

Is there any way to make this work? I really need this to be completely automated and run once per hour to grab files from the remote server. Here is my batch file and script file:

get_files.bat
@echo off

c:
cd \SCP
c:\progra~1\winscp3\winscp3 /console /script=C:\SCP\get_files.scp


get_files.scp
option batch on

option confirm off
open scp-connection
cd dropbox
option transfer binary
get *.csv C:\Data\
rm *.csv
close
exit


Thanks for any assistance you can offer.