This project is read-only.

SshAuthenticationException : User cannot be authenticated

Mar 14, 2013 at 2:56 PM
Edited Mar 14, 2013 at 2:56 PM

I'm getting SshAuthenticationException : User cannot be authenticated when trying to authenticate with username/password+private key(dsa, 2048bits w/o passphrase)
var connectionInfo = new ConnectionInfo(host, 22, username, new PasswordAuthenticationMethod(username, password),
                    new PrivateKeyAuthenticationMethod(username, new PrivateKeyFile(File.OpenRead(key_path))));    
            using (var sftp = new SftpClient(connectionInfo))
But with CoreFTP or WinSCP authentification works.
What am I doing wrong?
Latest version of for .net 3.5 is used,
Mar 20, 2013 at 3:10 PM
Any feedback? Maybe any details are required?
Mar 20, 2013 at 8:50 PM

Sorry for late reply.

I think I might have a problem with 2048 key size.
Unfortunately I wont have any time to work on it right now for probably next few weeks but defiantly will look at it later.
Can you please log this problem so I remember to get back to it?

Apr 1, 2013 at 5:01 AM
Hi Oleg,

Thanks for response.
I have created issue 1547. And also spent some time for debugging and wrote the solution.