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();
```
Comments: ** Comment from web user: olegkap **
```
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();
```
Comments: ** Comment from web user: olegkap **
Hey,
Thanks for reporting it and providing a fix.
I couldn't test that situation cause I don't have a server to test against.
I just committed your provided fix.
Thanks,
Oleg