SFTP prompting for key password

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
SCB-jcole
500 Command not understood
Posts: 2
Joined: 2019-06-26 18:09
First name: Josh
Last name: Cole

SFTP prompting for key password

#1 Post by SCB-jcole » 2019-06-26 18:19

I recently added a public key for an SFTP server (call it SFTP 1 for simplicity) that I am connecting to that requires a password. I also have another SFTP (SFTP 2) server that I connect to that does not use a key at all. Whenever I try to connect to SFTP 2 since adding the key it prompts me to enter a password for the public key, which has no relation to SFTP 2. If I enter the correct password, it tells gives me an authentication failure, if I close the window it aborts the connection. I can work around it by removing the key when I need to connect to SFTP 2 and re-adding it when I connect to SFTP 1, but this would be a daily process. I have logs and can provide debug lines if needed.

User avatar
botg
Site Admin
Posts: 32378
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: SFTP prompting for key password

#2 Post by botg » 2019-06-26 18:54

Here's what happens with your server:

1. FileZilla connects to the SFTP server
2. Client and server agree on various parameters, including the challenge that is used for public key authentication
3. FileZilla reads the unprotected (because public) public key from the key file.
4. FileZilla asks the server: Hey, can I sign the challenge we authenticate with this key please?
5. The server agrees to use this key for authentication
6. Now FileZilla prompts you for the password to the key file so that it can use the private key to sign the challenge
7. FileZilla sends the signature to the server
8. The server rejects the signature because it does not know the public key
9. FileZilla tries again with the next key or if there is none, the next authentication mechanism

The question is, why does the server agree to use authentication with a particular key when it doesn't actually allow authentication with that key?

SCB-jcole
500 Command not understood
Posts: 2
Joined: 2019-06-26 18:09
First name: Josh
Last name: Cole

Re: SFTP prompting for key password

#3 Post by SCB-jcole » 2019-06-26 18:56

I did forget to mention that another user with the same setup (we have verified all settings are the same and that he is connecting to the same servers), does not encounter this issue.

User avatar
botg
Site Admin
Posts: 32378
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: SFTP prompting for key password

#4 Post by botg » 2019-06-27 06:48

There must be some material difference in the configuration, either client-side or server-side.

Post Reply