Unable to change private key file

Need help with FileZilla Client? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
RelevantDad
500 Command not understood
Posts: 2
Joined: 2020-09-01 15:16
First name: Jesse
Last name: Prescott

Unable to change private key file

#1 Post by RelevantDad » 2020-09-01 15:19

Hello all,

I'm trying to use a new private key to connect to a server. I changed the path in the site manager and tried to connect. I renamed my old private key file, so that it wouldn't try to use the old key. I'm getting an error saying "Unable to open file" with the path to the old key file.

I checked the settings > Connections > SFTP and there was no key file stored there. And it's set correctly in the Site Manager to the new path. How can I force this to use the new file?

User avatar
boco
Contributor
Posts: 26899
Joined: 2006-05-01 03:28
Location: Germany

Re: Unable to change private key file

#2 Post by boco » 2020-09-01 16:20

FileZilla uses PuTTY technology for its SFTP support. As such, it shares the configuration in the Registry.

If you open Regedit.exe, you might still find information about your old SFTP key:

HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys


Did you close FileZilla to clear the session and then re-open it? Oh, and don't use the "Reconnect to last server" feature in this case, as it would still have the old information stored.
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Please do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###

RelevantDad
500 Command not understood
Posts: 2
Joined: 2020-09-01 15:16
First name: Jesse
Last name: Prescott

Re: Unable to change private key file

#3 Post by RelevantDad » 2020-09-01 16:52

Well removing the registry keys got the job done, thanks!

I still got an "Unable to use key" message for the old file. No idea how it still even knows about that file now.

But at least after that one failed, it still connected me (assuming using the new key)

So that works enough :D

jwalker-app
500 Command not understood
Posts: 1
Joined: 2022-09-21 13:49
First name: John
Last name: Walker

Re: Unable to change private key file

#4 Post by jwalker-app » 2022-09-21 14:07

I know that this post is a couple of years old, but the same thing just happened to me and I found the source of the error. I had created a new key pair for access to my SFTP server, but FileZilla was still finding a reference to the old key even though it didn't exist anywhere in the FileZilla configuration any more.

As @RelevantDad notes, renaming or deleting the old key will prevent it from loading, but the error message still displays in FileZilla.

@boco mentioned that FileZilla uses PuTTY settings.

The old key had been set to be my PuTTY default keyfile, so in the registry at Computer\HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings\PublicKeyFile the path and filename of the old key was stored.

Blanking the value in this field made the FileZilla error disappear. It also seems to have corrected a timeout error I had been experiencing when connected to my server.

Hope this helps someone. Thanks for the guidance from the original posters.

Post Reply