All Versions
10
Latest Version
Avg Release Cycle
161 days
Latest Release
1418 days ago

Changelog History

  • v2020.0.0-beta1 Changes

    June 07, 2020

    ๐Ÿ”„ Changes

    ๐Ÿ‘ Target framework support

    This release of SSH.NET adds support for .NET Standard 2.0.
    ๐Ÿ‘ This brings the full list of the supported target frameworks to:

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

    ๐Ÿ›  Fixes issue #357, #436 and #474.

    Key exchange algorithms

    SSH.NET now supports the following additional key exchange algorithms:

    • curve25519-sha256
    • [email protected]
    • ecdh-sha2-nistp256
    • ecdh-sha2-nistp384
    • ecdh-sha2-nistp521
    • diffie-hellman-group14-sha256
    • diffie-hellman-group16-sha512

    ๐Ÿ›  Fixes issue #53, #406 and #504.

    Host key algorithms

    ๐Ÿ‘ The following additional host key algorithms are now supported:

    • ssh-ed25519
    • ecdsa-sha2-nistp256
    • ecdsa-sha2-nistp384
    • ecdsa-sha2-nistp521

    Public key authentication

    SSH.NET now supports the following private key formats:

    • RSA in OpenSSL PEM and ssh.com format
    • DSA in OpenSSL PEM and ssh.com format
    • ECDSA 256/384/521 in OpenSSL PEM format
    • ED25519 in OpenSSH key format

    ๐Ÿ›  Fixes issue #485.

    โฑ Channel close timeout

    A ChannelCloseTimeout property has been introduced on ConnectionInfo that controls the timeout to apply when waiting for a server to acknowledge closing a channel. The default value is 1 second.

    If a server does not report to our SSH_MSG_CHANNEL_CLOSE message with a SSH_MSG_CHANNEL_CLOSE message before the specified timeout elapses, we'll stop waiting and consider the channel to be closed.

    ๐Ÿ›  Fixes issue #335.

    ๐Ÿ’ฅ Breaking changes

    ScpClient

    CVE-2018-20685 caused OpenSSH to implement more strict validation of file paths. ScpClient was updated to correctly deal with these changes.

    In case of a recursive directory upload, ScpClient cannot fully absorb the impact of these changes and as such Upload(DirectoryInfo directoryInfo, string path) now fails if path does not exist on the remote host. For the same reason, the mode and modification/access time will also no longer be set on path.

    The mode and modification/access time continue to be set on any files or subdirectories that are uploaded.

    ๐Ÿ›  Fixes

    General

    • ๐Ÿ‘‰ Use big endian byte order for port number in SOCKS request (issue #125 and #447).
    • Connect() times out when server rejects initializing subsystem (issue #308).
    • Keep-alives are not activated if connection is already opened (issue #334).
    • Connection cannot be re-established when subsystem cannot be executed (issue #338).
    • Closed event on Channel is not deterministic (issue #319).
    • Disconnect() and Dispose() may block indefinitely on .NET Core (issue #355 and #686).
    • ๐Ÿ”€ EAP implementation does not correctly deal with a socket operation that is completed synchronously (issue #377 and #571).
    • Identification string is not immediately sent when connection is established (issue #689 and #505).

    Feedback

    ๐Ÿ‘ Target framework support

    While our list of supported target frameworks is impressive, it does come with a cost. Some of these target frameworks are no longer supported by Microsoft and even required software that is no longer available for download.

    ๐Ÿ‘ We'd like to gather feedback from our users through this issue to learn how important it is to continue supporting all these target frameworks.

    Twitter

    Do you want to keep track of general progress and annoucements for SSH.NET? You can now follow us on Twitter.

    ๐Ÿ‘Œ Supporting SSH.NET

    Do you or your company rely on SSH.NET in your projects? If you want to encourage us to keep on going and show us that you appreciate our work, please consider becoming a sponsor through GitHub Sponsors.

    Thanks

    ๐Ÿš€ This release wouldn't have been possible without contributions from:
    @darinkes, @AtosNicoS, @dancret

  • v2016.1.0 Changes

    October 16, 2017

    ๐Ÿ”„ Changes

    Distribution

    ๐Ÿ“ฆ The NuGet Package Manager in Visual Studio 2012 does not support packages in which a given dependency is defined for more than one TFM. Since a fix for this issue is not expected any time soon, we're reviving support for a binary distribution.

    This plain .zip file contains the SSH.NET assembly, and where applicable any dependencies, for all supported target frameworks.

    ๐Ÿ“ฆ For Visual Studio 2015 and higher, the SSH.NET NuGet package remains our primary distribution mechanism.

    General

    • Increase initial window size for SSH channels from 2 MB to 2147483647 (231 - 1) bytes. This results in less protocol overhead when receiving data from a SSH server.
    • Data of an SSH_MSG_IGNORE server request is now ignored when the specified length is greater than the actual available bytes (issue #41).
    • โฌ‡๏ธ Reduce overhead when invoking both Disconnect() and Dispose().
    • ๐Ÿ‘Œ Improve performance of SSH message processing by eliminating use of dynamic dispatching.

    ScpClient

    A RemotePathTransformation property has been added to ScpClient that can be used to change if and how a remote path is transformed before it is passed to the scp command on the remote server.

    SSH.NET comes with the following path transformations that are exposed through the RemotePathTransformation class (in Renci.SshNet ):

    DoubleQuote
    Encloses a path in double quotes, and escapes any embedded double quote with a backslash.
    0๏ธโƒฃ This is the default , as it works fine with most SCP servers.

    ShellQuote
    Quotes a path in a way to be suitable to be used with a shell-based SCP server.
    This is the preferred mechanism for shell-based SCP servers, which typically means all Unix-like systems.

    None
    Performs no transformation to the path.
    This is the recommended transformation when the remote host does not require any quoting to preserve the literal value of metacharacters, or when remote paths are guaranteed not to contain such characters.

    When none of the built-in transformations match the specific requirements of a remote host, a custom transformation can be supplied.

    More information on this change is available here.

    ๐Ÿ›  Fixes issues #256 and #108.

    Example:

    Download a file using SCP, and apply shell quoting to the remote path:

    using Renci.SshNet;public class Program{ static void Main() { using (var client = new ScpClient("HOST", 22, "USER", "PWD")) { client.RemotePathTransformation = RemotePathTransformation.ShellQuote; client.Connect(); using (var ms = new MemoryStream()) { client.Download("/home/sshnet/file 123", ms); } } } }
    

    Since we've configured ScpClient to use the ShellQuote transformation, the /home/sshnet/file 123 path
    will automatically be enclosed in single quotes.

    The actual path that is passed to the scp command on the remote host is therefore '/home/sshnet/file 123'.

    SftpClient

    • When the read buffer is empty, SftpFileStream.Read(byte[], int, int) only writes those bytes to the buffer that go beyond the number of bytes requested by the caller.
    • Reduced memory allocations in SftpFileStream by lazily allocating read and write buffer.
    • Improved compatibility of SftpFileStream.SetLength(long value) with System.IO.FileStream (PR #272):
      • Flush buffers before changing the length of stream.
      • Move the current position to the last byte of the stream if the current position is greater than the new length.
    • Eliminated extra read from server in SftpFileStream to determine EOF.
    • ๐ŸŽ Greatly improved performance of SftpClient.(Begin)DownloadFile(...) by asynchronously reading ahead chunks (issue #145 and #100).

    SshClient

    • A ForwardedPortDynamic now supports domain name addresses for SOCKS5 requests (issue #98).

    ๐Ÿ’ฅ Breaking changes

    ScpClient

    The Upload(FileInfo fileInfo, String path) method in ScpClient now expects path to be the remote path of the file to which you want to upload, and throws a ScpException if a directory exists on the remote host for that path (issue #286).

    Up until now, uploading a file with a given (remote) path could lead a different result depending on whether a directory for that path exits on the remote host.

    Example:

    using (var client = new ScpClient("host", "user", "pwd")) { client.Connect(); client.Upload(new FileInfo(@"c:\temp\newlog.txt", "/home/sshnet/log"); }
    

    ๐Ÿš€ As of version 2016.1.0-beta 3 a ScpException will be thrown when /home/sshnet/log exists as a directory on the remote host.

    In previous versions of SSH.NET this code would actually upload the content of the c:\temp\newlog.txt file to /home/sshnet/log/newlog.txt.

    ๐ŸŒฒ When /home/sshnet/log exists on the remote host as a file or does not exist at all, the content of the c:\temp\newlog.txt file will be uploaded to /home/sshnet/log. This has not changed.

    SftpClient

    The IsAsync property was removed from SftpFileStream. Previously this property always returned false.

    The read and write position in SftpFileStream are no longer tracked separately. Reading from or seeking in the SftpFileStream will now also affect the position at which a subsequent write is performed, and vice versa (issue #253).

    For example, the following code snippet will now write "123456" to the console:

    var buffer = Encoding.UTF8.GetBytes("123456"); using (var client = new SftpClient("host", "user", "pwd")) { client.Connect(); using (var ws = client.OpenWrite(path)) { ws.Write(buffer, 0, 3); } using (var ws = client.OpenWrite(path)) { ws.Seek(3, SeekOrigin.Begin); ws.Write(buffer, 3, 3); } Console.WriteLine(client.ReadAllText(path, Encoding.UTF8)); }
    

    To improve compatibility of SftpFileStream with System.IO.FileStream, Append mode is now only allowed when combined with write-only access (issue #267). This only affects SftpClient.Open(string path, FileMode mode, FileAccess access).

    The following code snippet will now throw an ArgumentException :

    using (var client = new SftpClient("host", "user", "pwd")) { client.Connect(); using (var fs = client.Open("/home/user/file.log", FileMode.Append, FileShare.Read)) { } }
    

    Result:
    System.ArgumentException: Append mode can be requested only when combined with write-only access.

    To improve compatibility of SftpClient with System.IO.File, the following methods now use UTF-8 encoding without a Byte-Order Mark (BOM):

    • void AppendAllLines(string path, IEnumerable<string> contents)
    • void AppendAllText(string path, string contents)
    • StreamWriter AppendText(string path)
    • StreamWriter CreateText(string path)
    • void WriteAllLines(string path, IEnumerable<string> contents)
    • void WriteAllLines(string path, string[] contents)
    • void WriteAllText(string path, string contents)

    ๐Ÿ›  Fixes

    General

    Servers that do not implement RFC 4252 correctly may lead to stack overflow (issue #306).

    Section 5.1 of the aforementioned RFC states the following on SSH_MSG_USERAUTH_FAILURE response:

    The value of 'partial success' MUST be TRUE if the authentication request to which this is a response was successful. It MUST be FALSE if the request was not successfully processed.

    Some SSH servers set 'partial success' to TRUE even if the authentication request was not processed successfully, and do not update the name-list to remove the method name that failed.

    SSH.NET has now been updated only attempt authentication 5 times for a method that was considered partially successful.

    If this limit is reached for a given method name, and no other authentication method is available, a SshAuthenticationException with message "Reached authentication attempt limit for method (<method name>)" will be thrown.

    Key exchange is slow when size of group is more than 1024 bit (issue #304 and #130).

    As part of the key exchange, SSH.NET sends a SSH_MSG_KEY_DH_GEX_REQUEST with a 1024 bit minimum and preferred group size, and 8192 bit maximum group size.

    Before this fix, we would generate a private exponent that matches the size of the safe prime generated by the server. In some cases this meant using a 8192 bit private component to generate the client exchange value, which is a CPU intensive operation.

    As from this fix, we generate a private exponent that is twice the hash size with a minimum of 1024 bit.

    ConnectSocks5() throws a ProxyException with a wrong message (issue #167).

    Comments in ProxyException.cs are not relevant (issue #163).

    ๐Ÿ‘ป SSH exception after client connect using .NET 3.5 version (issue #113).

    ๐Ÿ– Handle leak when connection to SSH server fails (issue #55).

    Race condition when both server and client close channel (issue #84).

    ๐Ÿ‘ป Suppressing a not-connected exception on socket shutdown (issue #86).

    Race condition when both server and client disconnect (issue #80).

    Do not consume request-specific data for SSH_MSG_GLOBAL_REQUEST (issue #58).

    SocketAsyncEventArgs leak establishing socket connection (issue #133 and #87).

    ScpClient

    ๐Ÿ‘ Upload(Stream source, String path) does not support uploading a file to the home directory using a relative path (issue #280).

    The following code will now just work:

    using (var client = new ScpClient("host", "user", "pwd")) { client.Connect(); using (var fs = File.OpenRead(@"c:\file.log")) { client.Upload(fs, "file.log"); } }
    

    ๐Ÿ‘ป Upload(Stream source, String path) does not throw an exception when parent directory does not exist (issue #289).

    ScpClient does not support non-ASCII characters in downloaded file names or error message (issue #281).

    SftpClient

    • DowloadFile(String path, Stream output, Action<UInt64>) does not perform well on Sun SSH (issue #292).
    • SftpFileStream allows invalid combinations of FileMode and FileAccess (issue #191).
    • SftpFileStream.ReadByte() throws ArgumentException when no data is available in read buffer (issue #173).
    • SftpFileStream also sends SSH_FXP_FSTAT upon initialization when mode is not Append (issue #154).
    • In Append mode, SftpFileStream throws a SftpPathNotFoundException when the specified file does not exist (issue #266).
    • Uploads with a buffer size that is less than or greather than 32 Kb would corrupt (issue #70).

    SshClient

    • ShellStream.Write(byte[] buffer, Int32 offset, Int32 count) skips a single byte when buffer is full (PR #211).
    • CreateShellStream overloads always use a 1024 byte buffer (issue #303)
    • ๐Ÿ‘ป Dispose() throws exception when SSH session gets disconnected unexpectedly (issue #96).
    • ForwardedPort.Stop() no longer throws ObjectDisposedException when the port is disposed.

    ScpClient

    • ScpClient.Upload(DirectoryInfo, string) adds extra directory level (issue #128).
    • ScpClient.Upload(DirectoryInfo, string) applies timestamp of parent directory (issue #129).

    ๐Ÿš€ Release notes

    ๐Ÿš€ These release notes include all changes since 2016.0.0. The individual release notes for the releases leading up to the 2016.1.0 release are available here: beta 1, beta 2, beta 3, beta 4.

    ๐Ÿš€ There have been no changes since beta 4.

  • v2016.1.0-beta4 Changes

    October 07, 2017

    ๐Ÿ›  Fixes

    General

    Servers that do not implement RFC 4252 correctly may lead to stack overflow (issue #306).

    Section 5.1 of the aforementioned RFC states the following on SSH_MSG_USERAUTH_FAILURE response:

    The value of 'partial success' MUST be TRUE if the authentication request to which this is a response was successful. It MUST be FALSE if the request was not successfully processed.

    Some SSH servers set 'partial success' to TRUE even if the authentication request was not processed successfully, and do not update the name-list to remove the method name that failed.

    SSH.NET has now been updated only attempt authentication 5 times for a method that was considered partially successful.

    If this limit is reached for a given method name, and no other authentication method is available, a SshAuthenticationException with message "Reached authentication attempt limit for method (<method name>)" will be thrown.

    Key exchange is slow when size of group is more than 1024 bit (issue #304 and #130).

    As part of the key exchange, SSH.NET sends a SSH_MSG_KEY_DH_GEX_REQUEST with a 1024 bit minimum and preferred group size, and 8192 bit maximum group size.

    Before this fix, we would generate a private exponent that matches the size of the safe prime generated by the server. In some cases this meant using a 8192 bit private component to generate the client exchange value, which is a CPU intensive operation.

    As from this fix, we generate a private exponent that is twice the hash size with a minimum of 1024 bit.

  • v2016.1.0-beta3 Changes

    September 20, 2017

    ๐Ÿ”„ Changes

    ScpClient

    A RemotePathTransformation property has been added to ScpClient that can be used to change if and how a remote path is transformed before it is passed to the scp command on the remote server.

    SSH.NET comes with the following path transformations that are exposed through the RemotePathTransformation class (in Renci.SshNet ):

    DoubleQuote
    Encloses a path in double quotes, and escapes any embedded double quote with a backslash.
    0๏ธโƒฃ This is the default , as it works fine with most SCP servers.

    ShellQuote
    Quotes a path in a way to be suitable to be used with a shell-based SCP server.
    This is the preferred mechanism for shell-based SCP servers, which typically means all Unix-like systems.

    None
    Performs no transformation to the path.
    This is the recommended transformation when the remote host does not require any quoting to preserve the literal value of metacharacters, or when remote paths are guaranteed not to contain such characters.

    When none of the built-in transformations match the specific requirements of a remote host, a custom transformation can be supplied.

    More information on this change is available here.

    ๐Ÿ›  Fixes issues #256 and #108.

    Example:

    Download a file using SCP, and apply shell quoting to the remote path:

    using Renci.SshNet;public class Program{ static void Main() { using (var client = new ScpClient("HOST", 22, "USER", "PWD")) { client.RemotePathTransformation = RemotePathTransformation.ShellQuote; client.Connect(); using (var ms = new MemoryStream()) { client.Download("/home/sshnet/file 123", ms); } } } }
    

    Since we've configured ScpClient to use the ShellQuote transformation, the /home/sshnet/file 123 path
    will automatically be enclosed in single quotes.

    The actual path that is passed to the scp command on the remote host is therefore '/home/sshnet/file 123'.

    ๐Ÿ’ฅ Breaking changes

    ScpClient

    The Upload(FileInfo fileInfo, String path) method in ScpClient now expects path to be the remote path of the file to which you want to upload, and throws a ScpException if a directory exists on the remote host for that path (issue #286).

    Up until now, uploading a file with a given (remote) path could lead a different result depending on whether a directory for that path exits on the remote host.

    Example:

    using (var client = new ScpClient("host", "user", "pwd")) { client.Connect(); client.Upload(new FileInfo(@"c:\temp\newlog.txt", "/home/sshnet/log"); }
    

    As of version 2016.1.0-beta3 a ScpException will be thrown when /home/sshnet/log exists as a directory on the remote host.

    In previous versions of SSH.NET this code would actually upload the content of the c:\temp\newlog.txt file to /home/sshnet/log/newlog.txt.

    ๐ŸŒฒ When /home/sshnet/log exists on the remote host as a file or does not exist at all, the content of the c:\temp\newlog.txt file will be uploaded to /home/sshnet/log. This has not changed.

    ๐Ÿ›  Fixes

    ScpClient

    ๐Ÿ‘ Upload(Stream source, String path) does not support uploading a file to the home directory using a relative path (issue #280).

    The following code will now just work:

    using (var client = new ScpClient("host", "user", "pwd")) { client.Connect(); using (var fs = File.OpenRead(@"c:\file.log")) { client.Upload(fs, "file.log"); } }
    

    ๐Ÿ‘ป Upload(Stream source, String path) does not throw an exception when parent directory does not exist (issue #289).

    ScpClient does not support non-ASCII characters in downloaded file names or error message (issue #281).

    SftpClient

    • DowloadFile(String path, Stream output, Action<UInt64>) does not perform well on Sun SSH (issue #292).

    SshClient

    • ShellStream.Write(byte[] buffer, Int32 offset, Int32 count) skips a single byte when buffer is full (PR #211).
    • CreateShellStream overloads always use a 1024 byte buffer (issue #303)
  • v2016.1.0-beta2 Changes

    August 16, 2017

    ๐Ÿ”„ Changes

    General

    • Increase initial window size for SSH channels from 2 MB to 2147483647 (231 - 1) bytes. This results in less protocol overhead when receiving data from a SSH server.

    SftpClient

    • When the read buffer is empty, SftpFileStream.Read(byte[], int, int) only writes those bytes to the buffer that go beyond the number of bytes requested by the caller.
    • Reduced memory allocations in SftpFileStream by lazily allocating read and write buffer.
    • Improved compatibility of SftpFileStream.SetLength(long value) with System.IO.FileStream (PR #272):
      • Flush buffers before changing the length of stream.
      • Move the current position to the last byte of the stream if the current position is greater than the new length.
    • Eliminated extra read from server in SftpFileStream to determine EOF.
    • ๐ŸŽ Greatly improved performance of SftpClient.(Begin)DownloadFile(...) by asynchronously reading ahead chunks (issue #145 and #100).

    ๐Ÿ’ฅ Breaking changes

    SftpClient

    The IsAsync property was removed from SftpFileStream. Previously this property always returned false.

    The read and write position in SftpFileStream are no longer tracked separately. Reading from or seeking in the SftpFileStream will now also affect the position at which a subsequent write is performed, and vice versa (issue #253).

    For example, the following code snippet will now write "123456" to the console:

    var buffer = Encoding.UTF8.GetBytes("123456"); using (var client = new SftpClient("host", "user", "pwd")) { client.Connect(); using (var ws = client.OpenWrite(path)) { ws.Write(buffer, 0, 3); } using (var ws = client.OpenWrite(path)) { ws.Seek(3, SeekOrigin.Begin); ws.Write(buffer, 3, 3); } Console.WriteLine(client.ReadAllText(path, Encoding.UTF8)); }
    

    To improve compatibility of SftpFileStream with System.IO.FileStream, Append mode is now only allowed when combined with write-only access (issue #267). This only affects SftpClient.Open(string path, FileMode mode, FileAccess access).

    The following code snippet will now throw an ArgumentException :

    using (var client = new SftpClient("host", "user", "pwd")) { client.Connect(); using (var fs = client.Open("/home/user/file.log", FileMode.Append, FileShare.Read)) { } }
    

    Result:
    System.ArgumentException: Append mode can be requested only when combined with write-only access.

    To improve compatibility of SftpClient with System.IO.File, the following methods now use UTF-8 encoding without a Byte-Order Mark (BOM):

    • void AppendAllLines(string path, IEnumerable<string> contents)
    • void AppendAllText(string path, string contents)
    • StreamWriter AppendText(string path)
    • StreamWriter CreateText(string path)
    • void WriteAllLines(string path, IEnumerable<string> contents)
    • void WriteAllLines(string path, string[] contents)
    • void WriteAllText(string path, string contents)

    ๐Ÿ›  Fixes

    General

    • ConnectSocks5() throws a ProxyException with a wrong message (issue #167).
    • Comments in ProxyException.cs are not relevant (issue #163).
    • ๐Ÿ‘ป SSH exception after client connect using .NET 3.5 version (issue #113).

    SftpClient

    • SftpFileStream allows invalid combinations of FileMode and FileAccess (issue #191).
    • SftpFileStream.ReadByte() throws ArgumentException when no data is available in read buffer (issue #173).
    • SftpFileStream also sends SSH_FXP_FSTAT upon initialization when mode is not Append (issue #154).
    • In Append mode, SftpFileStream throws a SftpPathNotFoundException when the specified file does not exist (issue #266).
  • v2016.1.0-beta1 Changes

    December 14, 2016

    ๐Ÿ†• New Features

    SshClient

    • A ForwardedPortDynamic now supports domain name addresses for SOCKS5 requests (issue #98).

    ๐Ÿ”„ Changes

    Distribution

    ๐Ÿ“ฆ The NuGet Package Manager in Visual Studio 2012 does not support packages in which a given dependency is defined for more than one TFM. Since a fix for this issue is not expected any time soon, we're reviving support for a binary distribution.

    This plain .zip file contains the SSH.NET assembly, and where applicable any dependencies, for all supported target frameworks.

    ๐Ÿ“ฆ For Visual Studio 2015 and higher, the SSH.NET NuGet package remains our primary distribution mechanism.

    General

    • Data of an SSH_MSG_IGNORE server request is now ignored when the specified length is greater than the actual available bytes (issue #41).

    SshClient

    • ForwardedPort.Stop() no longer throws ObjectDisposedException when the port is disposed.

    ๐ŸŽ Performance

    • โฌ‡๏ธ Reduce overhead when invoking both Disconnect() and Dispose().
    • ๐Ÿ‘Œ Improve performance of SSH message processing by eliminating use of dynamic dispatching.

    ๐Ÿ›  Fixes

    General

    • ๐Ÿ– Handle leak when connection to SSH server fails (issue #55).
    • Race condition when both server and client close channel (issue #84).
    • ๐Ÿ‘ป Suppressing a not-connected exception on socket shutdown (issue #86).
    • Race condition when both server and client disconnect (issue #80).
    • Do not consume request-specific data for SSH_MSG_GLOBAL_REQUEST (issue #58).
    • SocketAsyncEventArgs leak establishing socket connection (issue #133 and #87).

    SftpClient

    • Uploads with a buffer size that is less than or greather than 32 Kb would corrupt (issue #70).

    SshClient

    • ๐Ÿ‘ป Dispose() throws exception when SSH session gets disconnected unexpectedly (issue #96).

    ScpClient

    • ScpClient.Upload(DirectoryInfo, string) adds extra directory level (issue #128).
    • ScpClient.Upload(DirectoryInfo, string) applies timestamp of parent directory (issue #129).
  • v2016.0.0 Changes

    August 02, 2016

    ๐Ÿ”„ 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).
  • v2016.0.0-beta3 Changes

    July 27, 2016

    ๐Ÿ†• New Features

    ๐Ÿ‘ .NET Core support

    This is the first release of SSH.NET providing support for .NET Core.
    ๐Ÿš€ The focus for this release was feature completeness and stability.
    ๐Ÿš€ Future releases will focus on performance.

    ๐Ÿ”„ Changes

    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 } }
    
  • v2016.0.0-beta2 Changes

    June 25, 2016

    ๐Ÿ”„ Changes:

    • ๐Ÿ‘Œ Improved performance of ScpClient (GitHub issue #21)

    ๐Ÿ›  Fixes:

    • Terminal width (pixels) is not passed in pty-req
    • Stopping ForwardedPortDynamic without ever having started would result in a NRE
  • v2016.0.0-beta1 Changes

    June 19, 2016

    ๐Ÿ†• New Features:

    • โž• Added support for HMAC-SHA512 (hmac-sha2-512 and hmac-sha2-512-96)
    • โž• Added support for Universal Windows Platform 10 (UAP10.0)

    ๐Ÿ”„ Changes:

    • ๐ŸŽ Overall performance improvements
    • 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, prefer hash algorithms and encodings from target framework
    • ๐Ÿ”จ Refactoring to prepare for upcoming .NET Core support

    ๐Ÿ›  Fixes:

    • Partial reads from stream assume end (CodePlex issue #1516)
    • 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 (GitHub issue #8)