Hey,
Maybe i am missing the obvious here, but i see no reason why my connection should not work.
The Key is already converted into something SSH.net usable:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,
...
-----END RSA PRIVATE KEY-----
and a corresponding ssh call shows the public key is registered on the server correctly:
ssh DOMAIN -l root -i C:\Users\XXXX\.ssh\id_XXXX
-> Works
Then why does this code throws an exception on connect?
varconnectionInfo=newConnectionInfo(uploadTargetHost,sshUser,newPrivateKeyAuthenticationMethod(sshUser,newPrivateKeyFile(@"C:\Users\XXXX\.ssh\id_XXXX",keyPassword)));usingvarclient=newSftpClient(connectionInfo);EventHandler<HostKeyEventArgs>clientOnHostKeyReceived=(sender,e)=>{e.CanTrust=true;};client.HostKeyReceived+=clientOnHostKeyReceived;client.Connect();Renci.SshNet.Common.SshAuthenticationException: 'Permission denied (publickey).'
Hey,
Maybe i am missing the obvious here, but i see no reason why my connection should not work.
The Key is already converted into something SSH.net usable:
and a corresponding ssh call shows the public key is registered on the server correctly:
Then why does this code throws an exception on connect?