Commit Graph

1643 Commits

Author SHA1 Message Date
Rob Hague dab8a11738 Use BouncyCastle for Diffie-Hellman key exchange (#1654)
Removes another vestige of hand-rolled crypto, and makes the classes public +
configurable for if/when we remove certain algorithms.
2025-08-02 11:08:56 +02:00
Rob Hague b7c5f1a87d Adapt InternalUploadFile for async (#1653)
The recently added UploadFileAsync effectively calls stream.CopyToAsync(SftpFileStream).
This is slower than the sync UploadFile (by about 4x in a local test) because the sync
version sends multiple write requests concurrently, without waiting for each response
in turn like the stream-based version does.

This change adapts the sync code for async and uses it to bring the performance of
UploadFileAsync in line with that of UploadFile.
2025-08-02 11:08:27 +02:00
Bart Vries d40bc43ac1 Refactor logging to allow a loggerfactory per session (#1673)
* Refactor logging to allow a loggerfactory per session specified in the ConnectionInfo.

This commit introduces an `ILoggerFactory` to various classes, replacing the static logger factory with an instance-based approach for more flexible and session-specific logging. These changes improve the logging framework's flexibility and maintainability and allow unit testing of logging.

* Improvements bases on feedback. Fixed tests. Added documentation.

* Update src/Renci.SshNet/ConnectionInfo.cs

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2025-07-26 21:24:48 +02:00
dependabot[bot] fc988bd938 Bump dependencies
* Bump the dependencies group with 5 updates

Signed-off-by: dependabot[bot] <support@github.com>

* seal types not publicly instantiable (ma0053)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2025-07-12 21:03:08 +02:00
Jacob Slusser 4886529ee2 Fixes spelling errors (#1668)
* Fixes spelling errors in comments, private members, and public members in test projects

* Adds en-GB as spell checker option; reverts notable cases of American English

* convert file UTF-16 LE BOM -> UTF-8

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2025-07-12 21:01:57 +02:00
thegame4craft 6bb397872b scp: notify for uploading finished when uploaded an empty file (#1658)
* scp: add flag to notify for uploading finished when uploaded an empty file

* remove notifyOnEmptyFile Flag
2025-06-20 08:53:51 +02:00
Rob Hague fd05d76ad6 Use ArraySegment for channel data (#1650)
The library currently allocates 4 bytes (and some) for every 1 byte of file
downloaded(*). It could be 0. This takes it to 3.

(*)
1. Array allocated for read of encrypted packet from socket
2. Array for decrypted packet
3. Array for channel data (removed in this change)
4. Array for sftp data packet
2025-06-06 08:52:23 +02:00
Rob Hague 1f1a5fe2ac Use an array buffer for the sftp packet stream (#1649)
The sftp packet stream runs within but independently of the channel data stream,
meaning a channel data packet can contain multiple sftp packets, or an sftp packet
can be split across multiple channel data packets.

Normally the packets are sized such there is a 1-to-1 relationship for efficiency.
When this doesn't happen the library falls back to buffering via a List<byte>,
which is not so efficient. This change uses an array-based buffer instead.

In a sample download which hit this fallback I see about a 20% reduction in memory
allocated.
2025-06-06 07:34:59 +02:00
Rob Hague caac95c836 Check host key algorithms before continuing key exchange (#1642)
The library currently does not check for matching host key algorithms until needed
at the end of the key exchange, in contrast to other algorithm types which are checked
beforehand. This leads to confusing or uninformative errors, normally from the server
(correctly) closing the connection.

This change moves that check alongside the rest of them, and also improves the error
messages that arise from no matching algorithms.
2025-06-06 07:34:06 +02:00
dependabot[bot] 26bc749409 Bump dependencies (#1652)
---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2025-06-06 07:32:45 +02:00
dependabot[bot] f82ebbabea Bump alpine from 3.21 to 3.22 in /test/Renci.SshNet.IntegrationTests (#1651)
Bumps alpine from 3.21 to 3.22.

---
updated-dependencies:
- dependency-name: alpine
  dependency-version: '3.22'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-05 23:20:58 +02:00
William Decker 9cf282731a Added GetAttributesAsync to SftpClient (#1648)
* Added GetAttributesAsync to SftpClient

* Adding integration tests + unit test

* Address warnings in test classes.

---------

Co-authored-by: William Decker <william.decker@syndigo.com>
2025-06-05 23:20:13 +02:00
mus65 03e28219ba Drop netstandard2.1 target (#1647) 2025-05-29 20:33:02 +02:00
Rob Hague a024b83def Fix hang in SftpClient.UploadFile upon error (#1643)
* Fix deadlock in SftpClient.UploadFile upon error

* Make RequestWrite deterministic wrt. exception handling

* add regression test; fix race

* x
2025-05-27 09:26:36 +02:00
Ivan 4fcf6048f8 Re-introduce ChangeWindow method on ShellStream (#1646)
* Re-introduce ChangeWindow method on ShellStream

* Fix pipeline build

* Fix pipeline build

* tweaks

Co-authored-by: Glen Kleidon <glenk@galkam.com.au>
Co-authored-by: oheiheiheiheihei <294797392@qq.com>

---------

Co-authored-by: Ivan Zaitsev <crackbargains@gmail.com>
Co-authored-by: Robert Hague <rh@johnstreetcapital.com>
Co-authored-by: Glen Kleidon <glenk@galkam.com.au>
Co-authored-by: oheiheiheiheihei <294797392@qq.com>
2025-05-25 20:09:03 +02:00
mus65 f24a5d6de6 fix IDE0350 warnings with .NET SDK 9.0.300 (#1645)
test\Renci.SshNet.IntegrationTests\OldIntegrationTests\SshCommandTest.cs(460,21,460,22): warning IDE0350: Lambda expression can be simplified (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0350)
2025-05-25 17:21:30 +02:00
Noah Dela Rosa d08c4aaa8a Add UploadFileAsync and DownloadFileAsync methods (#1634)
* add interface methods

* add internal file methods

* impl interface methods

* tweak buffer size usage

* swap tests with async upload

* swap more upload file references

* add async download tests

* add upload/download integration async test

* check if net48

* silence not await warning

* try tweaking test init

* remove request close from upload

* dispose already closes, remove dup call

* remove extra upload overload

* inherit doc

* configure await

* remove excess util functions

* add cancel throws

* add cancellation tests

* missed one configure await

* use default buffer size

* private ctor

* docs

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2025-05-05 23:03:10 +02:00
Rob Hague 7c07b10e4a Read the underlying buffer in SshDataStream (#1638)
SshDataStream is a MemoryStream, so we can access the buffer directly.
Also simplify some usage in PrivateKeyFile.
2025-05-04 12:39:01 +02:00
Rob Hague 6039e121a8 Override more methods in PipeStream, ShellStream (#1637)
Where beneficial, add additional overrides from the base Stream class. Namely the Span
variants and for PipeStream, the WriteAsync variants (see comments).

The change also adds an internal type borrowed from the runtime repo for easier buffer
management, which could also be used elsewhere.
2025-05-04 11:40:37 +02:00
Rob Hague 98982a931e Update docs and remove a leftover DSA certificate algorithm (#1632)
* Update docs and remove a leftover DSA certificate algorithm

* more cleanup
2025-05-04 11:39:54 +02:00
Rob Hague 85905082db Add a debug helper for reading traffic with Wireshark (#1627)
Wireshark can already helpfully dissect the initial SSH handshake. When given the
session keys, it can also dissect the encrypted traffic for inspection/debugging.
This adds a helper in Debug mode to write out that information in the format
Wireshark requires.

Usage is to set `SshNetLoggingConfiguration.WiresharkKeyLogFilePath` before connecting, and supply the same value to Wireshark in Edit -> Preferences -> Protocols
-> SSH -> "Key log filename".

The description of the format is at https://wiki.wireshark.org/SSH#key-log-format
2025-05-04 11:38:55 +02:00
Rob Hague 17afcdb0fe Set version to '2025.0.1-prerelease.{height}' 2025-04-18 20:38:06 +01:00
Rob Hague 53a5be0a7d Set version to '2025.0.0' 2025.0.0 2025-04-18 20:38:06 +01:00
Martin 1cc527e205 Added ExistsAsync and GetAsync to ISftpClient (#1628)
Co-authored-by: Martin Solarik <martin.solarik@rws.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2025-04-10 13:00:07 +02:00
dependabot[bot] 58eaeec226 Bump the dependencies (#1625)
* Bump the dependencies group with 5 updates

* use MEL 8.0.3

* use MSTest meta package

* revert Meziantou due to NRE

* add a more useful global.json and pin third party action

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2025-04-10 09:13:36 +02:00
mus65 ad174829cc remove unused bcrypt code (#1626) 2025-04-05 15:50:00 +02:00
mus65 02c30c88a9 Only enable TreatWarningsAsErrors in Release (#1624)
* Only enable TreatWarningsAsErrors in Release

* Remove global.json

this doesn't actually do anything useful like this.

* Also check CI

Co-authored-by: Rob Hague <rob.hague00@gmail.com>

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2025-03-29 19:53:36 +01:00
mus65 c318e39d2c lock SendData to fix random connection failures (#1623) 2025-03-29 17:16:42 +01:00
Rob Hague 153b47d976 Add an OrderedDictionary implementation for algorithm priorities (#1611)
* Add an OrderedDictionary implementation for algorithm priorities

During the key exchange, the algorithms to be used are chosen based on the order that
the client sends: first algorithm is most desirable. Currently, the algorithm
collections in ConnectionInfo are defined as IDictionary<,> and backed by
Dictionary<,>, which does not have any guarantees on the order of enumeration
(in practice, when only adding and not removing items it does enumerate in the order
that items were added as an implementation detail, but it's not great to rely on it).

This change adds IOrderedDictionary<,> and uses it in ConnectionInfo. On .NET 9,
this is backed by System.Collections.Generic.OrderedDictionary<,> and on lower
targets, it uses a relatively simple implementation backed by a List and a
Dictionary.

* use ThrowIfNegative
2025-03-25 14:27:19 +01:00
Rob Hague 484afbdf9d Add a Stream buffer validation helper (#1605)
* Add a Stream buffer validation helper

* add ThrowHelper.ThrowIfNegative
2025-03-25 12:45:18 +01:00
Rob Hague bb3beeb6c5 Fix API break on KeyExchange (#1609)
This type is public and a `private protected` ctor breaks subclassing outside the assembly
2025-03-25 09:57:46 +01:00
mus65 071a8d56a6 CI: run .NET Framework Integration Tests on Windows (#1615)
* CI: run .NET Framework Integration Tests on Windows

* use apt-get

* use vampire/setup-wsl

* Run Windows Integration Tests in separate job

so publish doesn't depend on it

* Ignore flakey Test from #1253 in CI
2025-03-25 09:13:28 +01:00
dependabot[bot] b803932903 Bump dependencies (#1607)
* Bump the dependencies group with 7 updates

Bumps the dependencies group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [BouncyCastle.Cryptography](https://github.com/bcgit/bc-csharp) | `2.5.0` | `2.5.1` |
| [Microsoft.NETFramework.ReferenceAssemblies](https://github.com/Microsoft/dotnet) | `1.0.3` | `1.0.3` |
| [Meziantou.Analyzer](https://github.com/meziantou/Meziantou.Analyzer) | `2.0.186` | `2.0.188` |
| [Microsoft.Extensions.Logging.Abstractions](https://github.com/dotnet/runtime) | `6.0.0` | `6.0.4` |
| [SonarAnalyzer.CSharp](https://github.com/SonarSource/sonar-dotnet) | `10.6.0.109712` | `10.7.0.110445` |
| [Microsoft.Extensions.Logging.Console](https://github.com/dotnet/runtime) | `9.0.1` | `9.0.2` |
| [MSTest.TestFramework](https://github.com/microsoft/testfx) | `3.7.3` | `3.8.2` |


Updates `BouncyCastle.Cryptography` from 2.5.0 to 2.5.1
- [Commits](https://github.com/bcgit/bc-csharp/compare/release-2.5.0...release-2.5.1)

Updates `Microsoft.NETFramework.ReferenceAssemblies` from 1.0.3 to 1.0.3
- [Commits](https://github.com/Microsoft/dotnet/commits)

Updates `Meziantou.Analyzer` from 2.0.186 to 2.0.188
- [Release notes](https://github.com/meziantou/Meziantou.Analyzer/releases)
- [Commits](https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.186...2.0.188)

Updates `Microsoft.NETFramework.ReferenceAssemblies` from 1.0.3 to 1.0.3
- [Commits](https://github.com/Microsoft/dotnet/commits)

Updates `Microsoft.Extensions.Logging.Abstractions` from 6.0.0 to 6.0.4
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](https://github.com/dotnet/runtime/compare/v6.0.0...v6.0.4)

Updates `Microsoft.NETFramework.ReferenceAssemblies` from 1.0.3 to 1.0.3
- [Commits](https://github.com/Microsoft/dotnet/commits)

Updates `Microsoft.NETFramework.ReferenceAssemblies` from 1.0.3 to 1.0.3
- [Commits](https://github.com/Microsoft/dotnet/commits)

Updates `SonarAnalyzer.CSharp` from 10.6.0.109712 to 10.7.0.110445
- [Release notes](https://github.com/SonarSource/sonar-dotnet/releases)
- [Commits](https://github.com/SonarSource/sonar-dotnet/compare/10.6.0.109712...10.7.0.110445)

Updates `Microsoft.Extensions.Logging.Console` from 9.0.1 to 9.0.2
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](https://github.com/dotnet/runtime/compare/v9.0.1...v9.0.2)

Updates `MSTest.TestFramework` from 3.7.3 to 3.8.2
- [Release notes](https://github.com/microsoft/testfx/releases)
- [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md)
- [Commits](https://github.com/microsoft/testfx/compare/v3.7.3...v3.8.2)

Updates `Microsoft.NETFramework.ReferenceAssemblies` from 1.0.3 to 1.0.3
- [Commits](https://github.com/Microsoft/dotnet/commits)

---
updated-dependencies:
- dependency-name: BouncyCastle.Cryptography
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: Microsoft.NETFramework.ReferenceAssemblies
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: Meziantou.Analyzer
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: Microsoft.NETFramework.ReferenceAssemblies
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: Microsoft.Extensions.Logging.Abstractions
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: Microsoft.NETFramework.ReferenceAssemblies
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: Microsoft.NETFramework.ReferenceAssemblies
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: SonarAnalyzer.CSharp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: Microsoft.Extensions.Logging.Console
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: MSTest.TestFramework
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: Microsoft.NETFramework.ReferenceAssemblies
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* downgrades+upgrades

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Robert Hague <rh@johnstreetcapital.com>
2025-03-02 18:01:21 +01:00
mus65 d1213cf751 remove Reverse extension to avoid source-breaking change with .NET 10 (#1606)
* remove Reverse extension to avoid source-breaking change with .NET 10

* revert to ifdef in some places

to avoid extra array copy on lower targets
2025-03-01 17:01:23 +01:00
mus65 86dc811458 Drop net6.0 target (#1580)
* Drop net6.0 target

* Update src/Renci.SshNet/Common/TaskToAsyncResult.cs

Co-authored-by: Rob Hague <rob.hague00@gmail.com>

* remove redundant #if

for some reason this made the compiler suddenly
realize that the plain text variables are unused.

* use TargetFrameworkIdentifier

this doesn't work in Directory.Build.props, moved it to Directory.Build.targets.

* fix null reference warnings in Benchmarks

seems like the warnings were (somehow) disabled here
before and were fixed by the previous TargetFrameworkIdentifier
change.

* fix unused plainTextOffset in AesGcmCipher.BclImpl

* CI retry

* more cosmetics

* more

* update README

* Revert "use TargetFrameworkIdentifier"

This reverts commit 076ede161d.

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
Co-authored-by: Robert Hague <rh@johnstreetcapital.com>
2025-02-19 13:37:38 +01:00
Rob Hague 99ef23cd87 Don't dispose channel when completing SshCommand (#1596)
The new(-ish) implementation of SshCommand has a race condition for short-lived
commands where SSH_MSG_CHANNEL_CLOSE may be processed on the message loop thread
before SSH_MSG_CHANNEL_SUCCESS is waited upon on the Execute (main) thread. This
manifests in an ArgumentNull/NullReference exception on the wait handle because
the channel has already been closed and disposed.

Fix this by only delaying the channel dispose until the command dispose.
2025-02-19 13:16:12 +01:00
Rob Hague a0c6bac3a7 Reply to global requests when want_reply is true (#1600)
We currently don't recognise any global requests from the server, but if one is
sent, then per RFC 4253 section 4 we still need to reply when the server expects
one. So send SSH_MSG_REQUEST_FAILURE in this case.
2025-02-19 13:15:45 +01:00
Rob Hague 429f7502ca Tweak logging.md (#1601) 2025-02-19 13:07:44 +01:00
dependabot[bot] 16d84d0395 Bump test dependencies (#1583)
* Bump coverlet.collector from 6.0.2 to 6.0.4

Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 6.0.2 to 6.0.4.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](https://github.com/coverlet-coverage/coverlet/compare/v6.0.2...v6.0.4)

---
updated-dependencies:
- dependency-name: coverlet.collector
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* update test deps

* update test deps

* some fixes

* group dependencies

* analyzer fixes

* just group them all together

* more cleanup

* silent analyzers -> suggestion

* restore constant

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Robert Hague <rh@johnstreetcapital.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2025-02-04 21:58:59 +01:00
Vyacheslav Brevnov 7a599e21c4 fix: UnhandledException: System.ObjectDisposedException. (#1590)
* fix: UnhandledException: System.ObjectDisposedException.
Error on thread pool

#1588

* tweak message

---------

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2025-02-04 21:40:06 +01:00
dependabot[bot] 3e2e260dc3 Bump actions/configure-pages from 4 to 5 (#1582)
Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5.
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/configure-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 19:36:39 +01:00
dependabot[bot] 7cbdcad56a Bump Microsoft.NET.Test.Sdk from 17.11.1 to 17.12.0 (#1585)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.11.1 to 17.12.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/compare/v17.11.1...v17.12.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 19:02:24 +01:00
mus65 301829fd96 Configure Dependabot to also update NuGet and GitHub Actions (#1581)
* Configure Dependabot to also update NuGet and GitHub Actions

* ignore some NuGet dependencies
2025-02-02 18:41:14 +01:00
timyhac 9c454ba978 Update bound port on ForwardedPortDynamic after connection (in case original was passed as zero) (#1577)
* update bound port (in case original was passed as zero)

* Needed to allow private set for BoundPort
2025-01-20 09:19:44 +01:00
Michał Drzymała 5c29394688 Move AuthenticationMethod IDisposable implementation declaration from inheritees to parent (#746)
* Move IDisposable implementation declaration from inheritees to parent AuthenticationMethod

* Move common Dispose code to AuthenticationMethod class

* Remove unnecessary finalizers

* just move the definition

---------

Co-authored-by: Michał Drzymała <michalxdrzymala@gmail.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2025-01-18 13:45:09 +01:00
Scott Xu 7e71bb4192 Add support for mlkem768x25519-sha256 key exchange method (#1563)
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
2025-01-11 15:46:22 +01:00
dependabot[bot] 9e1ee0a380 Bump alpine from 3.20 to 3.21 in /test/Renci.SshNet.IntegrationTests (#1567)
* Bump alpine from 3.20 to 3.21 in /test/Renci.SshNet.IntegrationTests

Bumps alpine from 3.20 to 3.21.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* merge #1553

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Robert Hague <rh@johnstreetcapital.com>
2025-01-03 12:46:01 +01:00
Rob Hague 6d94e97ac0 Fix hang/unhandled exception in SshCommand upon disconnect (#1565) 2025-01-03 11:13:45 +01:00
Rob Hague bc40d450ef Create dependabot.yml for docker image (#1559) 2025-01-03 11:12:46 +01:00
Rob Hague 60f3cd803e Drop DSA (#1558)
DSA is removed at compile time from OpenSSH 9.8 and higher.
That means we can no longer test it in our integration tests. It seems like a
good time to remove it. From the OpenSSH release notes:

    DSA, as specified in the SSHv2 protocol, is inherently weak - being
    limited to a 160 bit private key and use of the SHA1 digest. Its
    estimated security level is only 80 bits symmetric equivalent.

    OpenSSH has disabled DSA keys by default since 2015 but has retained
    run-time optional support for them. DSA was the only mandatory-to-
    implement algorithm in the SSHv2 RFCs, mostly because alternative
    algorithms were encumbered by patents when the SSHv2 protocol was
    specified.

    This has not been the case for decades at this point and better
    algorithms are well supported by all actively-maintained SSH
    implementations. We do not consider the costs of maintaining DSA
    in OpenSSH to be justified and hope that removing it from OpenSSH
    can accelerate its wider deprecation in supporting cryptography
    libraries.
2025-01-03 11:12:21 +01:00