Commit Graph

1244 Commits

Author SHA1 Message Date
Gert Driesen 5c2e2b4c4a Use SDK-style project where possible (#629)
* Change Renci.SshNet project into SDK-style project supporting .NET 3.5, .NET 4.0; .NET Standard 1.3, .NET Standard 2.0.
* Remove .NET 3.5 project.
* Remove .NET 3.5 test project.
* Refactor away .NET 3.5 and .NET 4.0 specific source files.
* Remove .NET Core project.
* Add VS 2019 solution.
* Use VS 2019 image and solution file in AppVeyor.
* Run tests against multi-target framework test project.
* No need to shutdown socket when client disconnects.
2020-02-28 21:46:39 +01:00
Gert Driesen 5d23ed43d7 Merge pull request #632 from AdiuTankT72/develop
Fixed few summary comment tags
2020-02-27 12:55:18 +01:00
Adrian Stanislawski ea5a440131 Fixed few summary comment tags 2020-02-27 11:36:39 +01:00
Gert Driesen e9e9b4e463 Update ScpClient to work with revent versions of OpenSSH (#625)
Update ScpClient to work with versions of OpenSSH that include fix for CVE-2018-20685.
2020-02-15 21:06:10 +01:00
Gert Driesen 546e2b9ece Merge pull request #496 from darinkes/elliptic
Elliptic Curves
2020-01-11 21:16:33 +01:00
drieseng 982ef10ae7 Update readme for the new key exchange methods, host key algorithms and private key formats. 2020-01-11 17:05:32 +01:00
Stefan Rinkes 7d7365156e Enable Build of Elliptic-Curves for other Projects 2018-12-09 16:41:40 +01:00
Stefan Rinkes c9f9e3ca35 Support for Ed25519 Host- and Private-Keys 2018-12-09 16:41:35 +01:00
Stefan Rinkes 90fb62b7cc Add Support for ECDSA Host- and Private-Keys
Also known as:
- ecdsa-sha2-nistp256
- ecdsa-sha2-nistp384
- ecdsa-sha2-nistp521

Basically it translate between SSH-Data and Microsoft Crypto API.
2018-12-09 13:00:10 +01:00
Stefan Rinkes b58a11c0da KEX with Elliptic Curve curve25519
Add Kex Algos curve25519-sha256(@libssh.org)
2018-12-09 13:00:10 +01:00
Stefan Rinkes 465451985a KEX with Elliptic Curves ecdh-sha2-nistp{256,384,521}
Add Kex Algos ecdh-sha2-nistp{256,384,521}

We have to use a minimalistic BouncyCastle Import for ECDH, since Microsoft's
System.Security.Cryptography is not usable in this case.

ECDiffieHellmanCng.DeriveKeyMaterial() already does the hashing and it's not
possible to get the unhased key material for further processing.

https://blogs.msdn.microsoft.com/shawnfa/2007/01/22/elliptic-curve-diffie-hellman/
2018-12-09 13:00:10 +01:00
Stefan Rinkes 2fe968ba7c Import Chaos.NaCl for ED25519 and Curve25519 2018-12-09 13:00:09 +01:00
Stefan Rinkes d24fe2006f Import minimalistic BouncyCastle for ECDH
With some rewrites to avoid import of unneeded features.
2018-12-09 13:00:05 +01:00
Gert Driesen bd01d97179 Use pack consistently.
Formatting.
2018-07-30 21:58:04 +02:00
Gert Driesen 07e142c1b1 SOCK4: search all host addresses for the first IPv4 address. 2018-07-30 21:57:14 +02:00
Gert Driesen cfd412529e Use switch instead of if/elseif. 2018-07-30 21:34:59 +02:00
Gert Driesen adeeb8c231 Minor refactoring of our SOCKS client support.
Use big endian format for port number. Fixes #447.
2018-07-29 22:15:48 +02:00
Gert Driesen 7b43bdcce9 Added Read(Socket socket, int size, TimeSpan timeout) method. 2018-07-29 21:50:48 +02:00
Gert Driesen 4f5aaec882 Remove unused fields. 2018-07-29 21:46:55 +02:00
Gert Driesen 198162d193 Use Pack.BigEndianToUInt16. 2018-07-29 21:46:35 +02:00
Gert Driesen 043b78bac9 Simplify names in crefs. 2018-07-28 22:15:13 +02:00
Gert Driesen 13bef36d38 Minor code cleanup. 2018-07-22 21:15:29 +02:00
Gert Driesen cbefe876dd Remove duplicate base class. 2018-07-22 21:15:03 +02:00
Gert Driesen 031f0a164b Fix name of argument in ArgumentOutOfRangeException thrown in OperationTimeout.
Added tests for OperationTimeout.
2018-07-22 21:14:32 +02:00
Gert Driesen 660b075c79 Added more tests for issue #338. 2018-07-22 21:12:32 +02:00
Gert Driesen 7932ba7618 Remove unused imports. 2018-07-21 12:56:56 +02:00
Gert Driesen 6a017aef73 Minor code style & naming changes. 2018-07-21 12:56:22 +02:00
Gert Driesen e75ab4a23c Added Decrypt test. 2018-07-21 12:43:19 +02:00
Gert Driesen de06f4555e Fix flaky test. 2018-07-21 12:31:17 +02:00
Gert Driesen 5941626615 Document TryWait overloads, and WaitResult enumeration. 2018-07-21 10:39:52 +02:00
Gert Driesen 6183f6d608 Add IUTF8 terminal mode. 2018-07-21 10:38:53 +02:00
Gert Driesen 7691cb0b55 Avoid leaking event subscriptions when an exception is thrown during initialization of ShellStream.
Handle error situations when initializing ShellStream.
2017-11-27 22:24:55 +01:00
Gert Driesen 69882b39f9 Remove unused import. 2017-11-27 22:20:19 +01:00
Gert Driesen 3e304ea7e7 * Add TryWait overloads to (I)Session that return the result of the wait instead of throwing an exception.
* Introduce a ChannelCloseTimeout property on ConnectionInfo that allows you to control how long you want to wait for the server to send a SSH_MSG_CHANNEL_CLOSE. The default value is 1 second.
* Use the newly introduced TryWait on Session with ChannelCloseTimeout as timeout in Channel to avoid throwing an exception when the server does not send a SSH_MSG_CHANNEL_CLOSE.
  Fixes #335.
* Removed unused WaitHandle from Channel.
2017-11-27 22:20:05 +01:00
Gert Driesen 66471e6741 When the request to open a subsystem fails, close the channel session and throw a SshException.
Fixes #308.
2017-11-15 21:50:49 +01:00
Gert Driesen 7cecd861f3 Merge branch 'develop' of https://github.com/sshnet/SSH.NET into develop 2017-11-11 19:47:08 +01:00
Gert Driesen 8141113259 Only keep reference to session if the connection was established successfully.
Fixes issue #338.
2017-11-11 19:20:03 +01:00
Gert Driesen 43047b11b5 Merge pull request #333 from sshnet/netstandard20
Add support for .NET Standard 2.0
2017-11-05 15:33:16 +01:00
Gert Driesen 66dcb0bfcb Ensure keep-alive timer is created when KeepAliveInterval is set after the connection has been established.
Fixes issue #334.
2017-11-05 15:30:51 +01:00
Gert Driesen 8156b625f7 Build .NET Standard 2.0 assembly.
Remove seperate build script.
2017-10-30 18:26:55 +01:00
Gert Driesen e443594a29 Prepare for 2017.0.0 beta1. 2017-10-30 18:02:56 +01:00
Gert Driesen 2c461bbfb2 Use new csproj format introduced in VS 2017.
Added support for .NET Standard 2.0.
2017-10-30 12:39:24 +01:00
Gert Driesen 25bb64fde9 Avoid using Result and Wait() on Task<T>. 2017-10-30 12:20:41 +01:00
Gert Driesen 95f0f22cbf Merge pull request #320 from sshnet/channel_closed
Channel: Raise the Closed event as part of the Close() method
2017-10-16 21:29:37 +02:00
Gert Driesen 93555c95da Remove a trailing CWL. 2017-10-12 22:05:37 +02:00
Gert Driesen f854227c0d Raise the Closed event as part the Close() method to:
* ensure the channel is closed at both ends before we raise this event
* ensure we raise the event before the channel is disposed

Fixes issue #319.
2017-10-12 21:59:37 +02:00
Gert Driesen 19167e7c80 Fix links 2016.1.0 2017-10-09 19:33:00 +02:00
Gert Driesen 5d664bd667 Include NuGet download count 2017-10-09 19:30:25 +02:00
Gert Driesen d58e96dc13 Merge remote-tracking branch 'refs/remotes/origin/master' into develop 2017-10-07 15:48:17 +02:00
Gert Driesen 7e80645f2e Merge branch 'master' of https://github.com/sshnet/SSH.NET 2016.1.0-beta4 2017-10-07 15:46:15 +02:00