SshAuthenticationException : User cannot be authenticated

Mar 14, 2013 at 1:56 PM
Edited Mar 14, 2013 at 1:56 PM
Hi,

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))
            {
                sftp.Connect();
But with CoreFTP or WinSCP authentification works.
What am I doing wrong?
Latest version of ssh.net for .net 3.5 is used,
Mar 20, 2013 at 2:10 PM
Any feedback? Maybe any details are required?
Coordinator
Mar 20, 2013 at 7:50 PM
Hi,

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?

Thanks,
Oleg
Apr 1, 2013 at 4:01 AM
Hi Oleg,

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


Thanks,
Alexander