Closed abeeme closed 1 month ago
That is a server-side configuration. You can't stop the server from authenticating you if it considers one method to be sufficient.
If you want to verify the identity of the server, you can check against its fingerprint following the example at https://github.com/sshnet/SSH.NET#verify-host-identify
Thank you for your quick response.
As this is a server-configuration, I understand if the server is configured to allow client connections via password and private key, using an instance of SshClient with these two auth methods will work as expected: only connection will be opened if both methods work, right?
Correct
Okey, thank you so much!
Hi,
I want to open a SSH client connection using two authentication methods: password and private key.
I've been testing SSH client connections with these two methods and it seems if the first one connects to the system correctly, the second one is not used. Is always this way or does the library let you use two methods somehow? I mean, what if I need to use two authentication methods and I only want to open the connection in case both work?
Thank you in advance