|
|
@@ -52,11 +52,16 @@ namespace Renci.SshNet.Connection
|
|
|
{
|
|
|
if (bytesReceived.Count == 0)
|
|
|
{
|
|
|
- throw new SshConnectionException("The server response does not contain an SSH protocol identification. Connection to remote server was closed before any data was received.", DisconnectReason.ConnectionLost);
|
|
|
+ throw new SshConnectionException(string.Format("The server response does not contain an SSH identification string.{0}" +
|
|
|
+ "The connection to the remote server was closed before any data was received.{0}{0}" +
|
|
|
+ "More information on the Protocol Version Exchange is available here:{0}" +
|
|
|
+ "https://tools.ietf.org/html/rfc4253#section-4.2",
|
|
|
+ Environment.NewLine),
|
|
|
+ DisconnectReason.ConnectionLost);
|
|
|
}
|
|
|
|
|
|
- throw new SshConnectionException(string.Format("The server response does not contain an SSH protocol identification:{0}{0}{1}{0}{0}" +
|
|
|
- "More information is available here:{0}" +
|
|
|
+ throw new SshConnectionException(string.Format("The server response does not contain an SSH identification string:{0}{0}{1}{0}{0}" +
|
|
|
+ "More information on the Protocol Version Exchange is available here:{0}" +
|
|
|
"https://tools.ietf.org/html/rfc4253#section-4.2",
|
|
|
Environment.NewLine,
|
|
|
PacketDump.Create(bytesReceived, 2)),
|
|
|
@@ -120,8 +125,7 @@ namespace Renci.SshNet.Connection
|
|
|
{
|
|
|
throw new SshConnectionException(string.Format(CultureInfo.InvariantCulture,
|
|
|
"The server response contains a null character at position 0x{0:X8}:{1}{1}{2}{1}{1}" +
|
|
|
- "A server must not send a null character before the Protocol Version Exchange is{1}" +
|
|
|
- "complete.{1}{1}" +
|
|
|
+ "A server must not send a null character before the Protocol Version Exchange is complete.{1}{1}" +
|
|
|
"More information is available here:{1}" +
|
|
|
"https://tools.ietf.org/html/rfc4253#section-4.2",
|
|
|
buffer.Count,
|