Replies: 2 comments 4 replies
-
No obvious answer I'm afraid Can you paste some sample code? |
Beta Was this translation helpful? Give feedback.
3 replies
-
Also any logs from the server side?
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the past I used the method Renci.SshNet.PasswordConnectionInfo for internal test of ssh connection. Everything worked fine.
Passing to Renci.SshNet.PrivateKeyConnectionInfo I am not able to connect to remote host at all, cause of the exception:
Exception trying to connect ssh host (userName@hostName): Renci.SshNet.Common.SshAuthenticationException: Permission denied (publickey). in Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session) in Renci.SshNet.ConnectionInfo.Authenticate(ISession session, IServiceFactory serviceFactory) in Renci.SshNet.Session.Connect() in Renci.SshNet.BaseClient.CreateAndConnectSession() in Renci.SshNet.BaseClient.Connect()
Using the shell everything works and the key seems to have no problem, but using the library I am not able to connect to the remote host.
I have also tried to use directly the pivate key content instead of referencing the file in the code, but nothing changes.
Any idea about how to make it works?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions