You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Renci.SshNet.Tests/Classes/Connection/ProtocolVersionExchangeTest_ConnectionClosedByServer_NoDataSentByServer.cs
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,12 @@ public void StartShouldHaveThrownSshConnectionException()
86
86
{
87
87
Assert.IsNotNull(_actualException);
88
88
Assert.IsNull(_actualException.InnerException);
89
-
Assert.AreEqual("Server response does not contain SSH protocol identification. Connection to remote server was closed before any data was received.",_actualException.Message);
89
+
Assert.AreEqual(string.Format("The server response does not contain an SSH protocol identification.{0}"+
90
+
"The connection to the remote server was closed before any data was received.{0}{0}"+
91
+
"More information on the Protocol Version Exchange is available here:{0}"+
Copy file name to clipboardExpand all lines: src/Renci.SshNet.Tests/Classes/Connection/ProtocolVersionExchangeTest_ServerResponseContainsNullCharacter.cs
Copy file name to clipboardExpand all lines: src/Renci.SshNet.Tests/Classes/Connection/ProtocolVersionExchangeTest_ServerResponseInvalid_SshIdentificationOnlyContainsProtocolVersion.cs
Copy file name to clipboardExpand all lines: src/Renci.SshNet/Connection/ProtocolVersionExchange.cs
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -52,11 +52,16 @@ public SshIdentification Start(string clientVersion, Socket socket, TimeSpan tim
52
52
{
53
53
if(bytesReceived.Count==0)
54
54
{
55
-
thrownewSshConnectionException("The server response does not contain an SSH protocol identification. Connection to remote server was closed before any data was received.",DisconnectReason.ConnectionLost);
55
+
thrownewSshConnectionException(string.Format("The server response does not contain an SSH identification string.{0}"+
56
+
"The connection to the remote server was closed before any data was received.{0}{0}"+
57
+
"More information on the Protocol Version Exchange is available here:{0}"+
0 commit comments