|
Currently (as of ~ 2.0.3854.0) an error message like: A supplied public key was not accepted by the server or the user name is incorrect. Given that we provide a 'SshPrivateKey' to the sftp.Login method, shouldn't this error read: A supplied private key was not accepted by the server or the user name is incorrect. ?? The server definitely has the 'public key', so perhaps that is the intended message -- it just seems a little off. Example Stack Trace: Could not authenticate with host 192.168.25.180. Possible reason: A supplied public key was not accepted by the server or the user name is incorrect. ---> Rebex.Net.SftpException: A supplied public key was not accepted by the server or the user name is incorrect. ---> Rebex.Net.SshException: A supplied public key was not accepted by the server or the user name is incorrect. at Rebex.Net.SshSession.cCIjvV(String , String , SshPrivateKey , SshGssApiCredentials ) |
|
This is a very interesting question. First, let me explain how the whole process works:
(see RFC 4252 for details.) This means that although a private key is provided to the Now, let's discuss the current message and the suggested alternative:
What about the following error message? Although it's technically correct, it's somewhat long: "A public key corresponding to the supplied private key was not accepted by the server or the user name is incorrect." Any suggestions are welcome! I do like your provided error message: "A public key corresponding to the supplied private key was not accepted by the server or the user name is incorrect." I favor a wordier error message (within reason) if it nails what the actual error is. The few attempts I made at shorter messages eliminated some aspects of the message, for example: "Invalid user name or public key for the provided private key." Doesn't mention the server. I'm sold on your message.
(10 May '11, 18:44)
Tim Frison
I have just submitted the wordier error message to our development source code. It will appear in the next public release in a month or two. Thanks for bringing this to our attention!
(17 May '11, 11:55)
Lukas Pokorny ♦♦
|