github sshnet/SSH.NET 2016.0.0

latest releases: 2024.2.0, 2024.1.0, 2024.0.0...
8 years ago

Changes since 2016.0.0-beta3

Fixes

  • Exception if both Password and PrivateKey authentication are tried (issue #55).

Changes since 2013.4.7

Breaking Changes

  • Assembly name is now Renci.SshNet for all supported target frameworks.
  • The Renci.SshNet assemblies for .NET and Silverlight are now strong-named (CodePlex issue #1802).

New Features

Target framework support

This is the first release of SSH.NET providing support for .NET Core and Universal Windows Platform 10 (UAP10.0). The support for .NET Core comes in the form of an assembly targeting the .NET Platform Standard 1.3 TFM.

The full list of the supported target frameworks for this release is:

  • .NET Framework 3.5
  • .NET Framework 4.0 (and higher)
  • .NET Platform Standard 1.3
  • Silverlight 4
  • Silverlight 5
  • Windows Phone 7.1
  • Windows Phone 8.0
  • Universal Windows Platform 10

Security

  • A given private key file can now be used concurrently.
  • Exception message for authentication failures have been improved.
  • Added support for ssh.com (SSH-2) private keys (CodePlex issue #1987).
  • Support an acceptable group of up to 8192 bits for SHA-1 and SHA-256 Diffie-Hellman Group and Key Exchange (CodePlex issue #1973 and #1777).
  • Added support for HMAC-SHA512 (hmac-sha2-512 and hmac-sha2-512-96).

General

  • Improved accuracy of IsConnected on .NET.
  • Relicensed code under MIT license, explicitly permitting reuse within proprietary software
    provided all copies of the licensed software include a copy of the MIT License terms and the
    copyright notice.
  • Separated our hash algorithms into SshNet.Security.Cryptography project and package.
  • When available, we prefer hash algorithms and encodings provided by a given target framework above our implementations.

Changes

Performance

Overall performance has been greatly improved. Some of the changes that contributed to these gains are:

  • Optimization of payload size for both read and write operations for SftpClient.
  • Increase window size from 1 MB to 2 MB.
  • Increase default buffer size from 16 KB to 32 KB for SftpClient.
  • Take into account the maximum remote packet size of the channel for write operations.
  • Increase maximum size of packets that we can receive from 32 KB to 64 KB.
  • No longer flush after every SCP write operation (issue #21).
  • Do not use reflection to create SSH message instances.
  • Eliminate creation and copy of buffers where possible.

Distribution

The SSH.NET NuGet package is now our only binary distribution mechanism.
We no longer provide zip files that contain the assembly for individual target frameworks.

Stop port forwarding

Up to now, stopping a forwarding port would block until all pending requests have completed and all channels are closed. This could result in a serious slowdown when stopping a SshClient with multiple forwarding ports.

As of this release, pending requests will be interrupted and the port will gracefully stop once all channels are closed.

Documentation

Allround improvements to the API documentation.

Exceptions in async methods

Exceptions that are thrown during async processing are no longer wrapped in a SshException.
For example, the following code will now just work:

using (var client = new SftpClient(connectionInfo))
{
    var asyncResult = client.BeginDownloadFile("/home/sshnet/remoteFileThatDoesNotExist", ms);
    ...
    try
    {
        client.EndDownloadFile(asyncResult);
    }
    catch (SftpPathNotFoundException)
    {
        // we should be landing here
    }
}

Fixes

Security

  • Exception if both Password and PrivateKey authentication are tried (issue #55).
  • Stuck loop on key exchange using arcfour encryption (CodePlex issue #1922).
  • No connection possible with the same auth method requested multiple times (CodePlex issue #1930).
  • Client cipher is used to decrypt server messages (CodePlex issue #1917).
  • Connection dropped by server due to invalid DSA signature (CodePlex issue #1918).
  • BlockCipher.Encrypt fails if input message is not padded (CodePlex issue #2547).
  • Wrong PKCS7 padding in DES algorithm (CodePlex issue #1580).
  • Write access required for private key file
  • Stack overflow during authentication when server returns same allowed methods after partial success (CodePlex issue #2399).

SshClient

  • Terminal width (pixels) is not passed in pty-req.
  • Stopping ForwardedPortDynamic without ever having started would result in a NRE.
  • Remove linefeed from WriteLine method in Shellstream class (CodePlex issue #1584).
  • SshCommand doesn't cleanup subscribed events (CodePlex issue #2295).
  • ShellStream.ReadLine produces incorrect output when reading multi-byte characters (CodePlex issue #3290).
  • Forwarded Port channels can get stuck waiting (CodePlex issue #1558).
  • Dynamic port forwarding slows down to a crawl (CodePlex issue #2010).
  • ForwardedPortDynamic: Unhandled exception if client terminates socket (CodePlex issue #1844).
  • Incorrect check for timeout values (CodePlex issue #1620).

SftpClient

  • SftpFileStream is very slow (CodePlex issue #1919).
  • SftpClient is throwing undocumented exceptions (CodePlex issue #2148).
  • SftpClient.Exists(string) returns true for a path that does not exist (CodePlex issue #1952, #1696 and #1574).
  • SftpClient constructor throws ArgumentException when host contains underscore (CodePlex issue #1845).
  • NullReferenceException when SftpFileStream is finalized after dispose of session (CodePlex issue #2013).
  • Partial reads from stream assume end (CodePlex issue #1516).

ScpClient

  • No longer flush after every SCP write operation (issue #21).
  • Missing files when using DirectoryUpload (CodePlex issue #1382).

General

  • Session.Disconnect() hangs forever (CodePlex issue #2591).
  • SshData.ReadInt64() is broken (CodePlex issue #2579).
  • Race condition when SSH_MSG_GLOBAL_REQUEST is received immediately after successful authentication (issue #8).
  • Lines before protocol identification string are not skipped (CodePlex issue #1935 and #2223).
  • Disable logging of messages in release builds (CodePlex issue #1767).
  • Timeout sending data to server with low window size (CodePlex issue #1706).
  • Unobserved exception rethrown by finalizer thread (CodePlex issue #1298 and #1587).
  • SendKeepAlive causes SocketException when connection is dropped (CodePlex issue #2029).
  • SocketException on Dispose or Disconnect (CodePlex issue #2400).
  • Sending EOF on wrong channel number (CodePlex issue #1877).
  • HTTP proxy hangs (CodePlex issue #1890).
  • Wrong parameters to SetSocketOption leads to SocketException under Mono (CodePlex issue #1799).
  • OverflowException on empty server response (CodePlex issue #1562).
  • Event handle leak (CodePlex issue #1761).
  • Client channels are no longer closed on dispose (CodePlex issue #1943).
  • ObjectDisposedException when channel is closing (CodePlex issue #1942 and #1944).
  • Signing key is missing from source download (CodePlex issue #2455).
  • Correct casing of Security/Cryptography/HMAC.cs to fix build on Linux (CodePlex issue #1505).

Don't miss a new SSH.NET release

NewReleases is sending notifications on new releases.