Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: SshAuthenticationException : User cannot be authenticated

$
0
0
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,

Viewing all articles
Browse latest Browse all 1729

Trending Articles