-
-
Notifications
You must be signed in to change notification settings - Fork 932
How to obtain remote server info
Gert Driesen edited this page Feb 15, 2017
·
1 revision
When submitting an issue, the name and version of the SSH server software is always useful - and in some cases even crucial - information.
If the issue you're reporting does not prevent you from establishing a connection, then you can use the following code - with the correct host and credentials - to write the identification string of the SSH server software to the console:
using (var client = new SshClient("127.0.0.1", "user", "pwd"))
{
client.Connect();
Console.WriteLine(client.ConnectionInfo.ServerVersion);
}
This identification string usually contains both the name and version of the server software.