chore(deps): update dependency ssh.net to 2025.1.0 #57
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2025.0.0->2025.1.0Release Notes
sshnet/SSH.NET (SSH.NET)
v2025.1.0Compare Source
Highlights
DownloadFileAsyncandUploadFileAsynctoSftpClient(#1634)SftpFileStreamin consecutive read (e.g.SftpFileStream.CopyTo) scenarios (#1705)Breaking changes:
SftpFileStreampreviously had some incomplete synchronisation for multi-threaded access, but was not advertised nor fully functioning as thread safe. This synchronisation was removed in #1705. When accessing anSftpFileStreaminstance from multiple threads simultaneously, ensure there exists appropriate synchronisation.SftpClient.CreateTextandWriteAll{Bytes/Text/Lines}were changed in #1686 to truncate the file before writing if it exists, to align with the equivalent methods onSystem.IO.File. Given that the prior behaviour was 14 years old, the change treads the line between breaking change and bug fix.IEnumerable<string> ReadLinesonSftpClientwas updated in #1681 to download and yield lines during enumeration rather than reading them all up front and returning the result. This means that the connection must be active during enumeration. When storing the result ofReadLinesfor later use, consider usingstring[] ReadAllLinesinstead.What's Changed
New Contributors
Full Changelog: sshnet/SSH.NET@2025.0.0...2025.1.0
API diff
namespace Renci.SshNet { public class ConnectionInfo { + public Microsoft.Extensions.Logging.ILoggerFactory? LoggerFactory { get; set; } } public interface ISftpClient : Renci.SshNet.IBaseClient { + System.Threading.Tasks.Task DownloadFileAsync(string path, System.IO.Stream output, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task<Renci.SshNet.Sftp.SftpFileAttributes> GetAttributesAsync(string path, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task UploadFileAsync(System.IO.Stream input, string path, System.Threading.CancellationToken cancellationToken = default); } public class SftpClient : Renci.SshNet.BaseClient, Renci.SshNet.ISftpClient, Renci.SshNet.IBaseClient { + public System.Threading.Tasks.Task DownloadFileAsync(string path, System.IO.Stream output, System.Threading.CancellationToken cancellationToken = default); + public System.Threading.Tasks.Task<Renci.SshNet.Sftp.SftpFileAttributes> GetAttributesAsync(string path, System.Threading.CancellationToken cancellationToken); + public System.Threading.Tasks.Task UploadFileAsync(System.IO.Stream input, string path, System.Threading.CancellationToken cancellationToken = default); } public sealed class ShellStream { + public void ChangeWindowSize(uint columns, uint rows, uint width, uint height); } } namespace Renci.SshNet.Common { public class SftpPathNotFoundException : Renci.SshNet.Common.SftpException { + public SftpPathNotFoundException(string? message, string? path, System.Exception? innerException); + public SftpPathNotFoundException(string? message, string? path); + public string? Path { get; } } + public class SftpException : Renci.SshNet.Common.SshException + { + public SftpException(Renci.SshNet.Sftp.StatusCode statusCode, string? message, System.Exception? innerException); + public SftpException(Renci.SshNet.Sftp.StatusCode statusCode, string? message); + public SftpException(Renci.SshNet.Sftp.StatusCode statusCode); + public Renci.SshNet.Sftp.StatusCode StatusCode { get; } + } } namespace Renci.SshNet.Security { + public class KeyExchangeDiffieHellman : Renci.SshNet.Security.KeyExchange + { + public KeyExchangeDiffieHellman(string name, Org.BouncyCastle.Crypto.Parameters.DHParameters parameters, System.Security.Cryptography.HashAlgorithmName hashAlgorithm); + public override void Start(Renci.SshNet.Session session, Renci.SshNet.Messages.Transport.KeyExchangeInitMessage message, bool sendClientInitMessage); + public override string Name { get; } + } + public class KeyExchangeDiffieHellmanGroupExchange : Renci.SshNet.Security.KeyExchange + { + public KeyExchangeDiffieHellmanGroupExchange(string name, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, uint minimumGroupSize, uint preferredGroupSize, uint maximumGroupSize); + public KeyExchangeDiffieHellmanGroupExchange(string name, System.Security.Cryptography.HashAlgorithmName hashAlgorithm); + public override void Start(Renci.SshNet.Session session, Renci.SshNet.Messages.Transport.KeyExchangeInitMessage message, bool sendClientInitMessage); + public override string Name { get; } + } } namespace Renci.SshNet.Sftp { public sealed class SftpFileAttributes { + public bool IsGroupIDBitSet { get; set; } + public bool IsStickyBitSet { get; set; } + public bool IsUIDBitSet { get; set; } } + public enum StatusCode + { + Ok = 0, + Eof = 1, + NoSuchFile = 2, + PermissionDenied = 3, + Failure = 4, + BadMessage = 5, + NoConnection = 6, + ConnectionLost = 7, + OperationUnsupported = 8, + } }Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.