You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Update README to point to https://sshnet.github.io/SSH.NET rather than the CHM file
- Add a CONTRIBUTING.md with some how-tos
For https://sshnet.github.io/SSH.NET:
- Use the repo README as the landing page to keep them in sync
- Combine the API-per-TFM pages to just one "API" page
- Add a couple more examples
- Add a GitHub link in the header.
Contributions in the form of issues, pull requests (PRs) and discussions are welcome to this repository. Please consider that the library is currently maintained as a hobby by a small number of individuals. As such, depending on the weather, work, private lives etc., your PR may wait an indeterminate amount of time before being addressed. Generally speaking, the more targeted and better tested the change, the quicker it can be merged.
2
+
3
+
## Building
4
+
5
+
The library has no special requirements to build, other than an up-to-date .NET SDK, and can be built from within the IDE or with `dotnet build` at the command line.
6
+
7
+
This repository also hosts the source for https://sshnet.github.io/SSH.NET/, which is built using [docfx](https://dotnet.github.io/docfx/index.html) and whose source files are in the `docfx/` directory. In order to build the site, install the docfx dotnet tool with `dotnet tool update -g docfx` and then run `docfx docfx/docfx.json --serve` from the root of the repository. When it completes, you should see e.g.
8
+
9
+
```
10
+
Serving "E:\github\SSH.NET\docfx\_site" on http://localhost:8080. Press Ctrl+C to shut down.
11
+
```
12
+
13
+
from which you can view the local version of the site. When making iterative changes, run `docfx docfx/docfx.json` from a separate command line and refresh the browser.
14
+
15
+
## Testing
16
+
17
+
The library has a test project for unit tests and a test project for integration tests. The latter uses [Testcontainers](https://dotnet.testcontainers.org/) which has a dependency on Docker. Practically, on Windows, an installation of Docker Desktop is all that is required, without any additional configuration. With Docker Desktop running, the integration tests can run like normal tests from within the IDE or with `dotnet test` at the command line.
18
+
19
+
Code coverage information can be generated for all test projects at once or for individual test projects. From the root of the repository or from the individual test project directory, run `dotnet test --collect:"XPlat Code Coverage"`.
20
+
21
+
The coverage information can be visualised using e.g. [ReportGenerator](https://reportgenerator.io/). Install the ReportGenerator dotnet tool with `dotnet tool update -g dotnet-reportgenerator-globaltool` and then run
View the report by opening TestResults/CoverageReport/index.html in the browser.
28
+
29
+
Before subsequent coverage collections, delete the previous collections with `git clean -fX test/` to prevent previous coverage files from being included in the subsequent generated report.
30
+
31
+
## CI
32
+
33
+
The repository makes use of continuous integration (CI) on [AppVeyor](https://ci.appveyor.com/project/drieseng/ssh-net/history) to validate builds and tests on PR branches and non-PR branches. At the time of writing, some tests can occasionally fail in CI due to a dependency on timing or a dependency on networking/socket code. If you see an existing test which is unrelated to your changes occasionally failing in CI but passing locally, you probably don't need to worry about it. If you see one of your newly-added tests failing, it is probably worth investigating why and whether it can be made more stable.
34
+
35
+
## Good to know
36
+
37
+
### TraceSource logging
38
+
39
+
The Debug build of SSH.NET contains rudimentary logging functionality via `System.Diagnostics.TraceSource`. See `Renci.SshNet.Abstractions.DiagnosticAbstraction` for usage examples.
40
+
41
+
### Wireshark
42
+
43
+
Wireshark is able to dissect initial connection packets, such as key exchange, before encryption happens. Enter "ssh" as the display filter. See https://wiki.wireshark.org/SSH.md for more information.
Copy file name to clipboardexpand all lines: README.md
+24-28
Original file line number
Diff line number
Diff line change
@@ -14,15 +14,8 @@ to achieve the best performance possible.
14
14
15
15
## Documentation
16
16
17
-
There is MSDN-style class documentation in a .chm file for each release, which you can find in the Assets section
18
-
of the [latest release](https://github.com/sshnet/SSH.NET/releases/latest) page. Please note that you will need
19
-
to [right-click and "unblock"](https://support.microsoft.com/en-us/help/2021383/some-chm-files-may-not-render-properly-on-windows-vista-and-windows-7)
20
-
the CHM file after you download it.
21
-
22
-
Currently (4/18/2020), the documentation is very sparse. Fortunately, there are a large number of tests in
23
-
[Renci.SshNet.Tests](https://github.com/sshnet/SSH.NET/tree/develop/test/Renci.SshNet.Tests) that demonstrate
24
-
usage with working code.
25
-
17
+
Documentation is hosted at https://sshnet.github.io/SSH.NET/. Currently (4/18/2020), the documentation is very sparse.
18
+
Fortunately, there are a large number of [tests](https://github.com/sshnet/SSH.NET/tree/develop/test/) that demonstrate usage with working code.
26
19
If the test for the functionality you would like to see documented is not complete, then you are cordially
27
20
invited to read the source, Luke, and highly encouraged to generate a pull request for the implementation of
28
21
the missing test once you figure things out. 🤓
@@ -45,13 +38,15 @@ the missing test once you figure things out. 🤓
45
38
## Encryption Method
46
39
47
40
**SSH.NET** supports the following encryption methods:
41
+
* aes128-ctr
42
+
* aes192-ctr
48
43
* aes256-ctr
49
-
* 3des-cbc
44
+
* aes128-gcm<span></span>@openssh.com (.NET 6 and higher)
45
+
* aes256-gcm<span></span>@openssh.com (.NET 6 and higher)
50
46
* aes128-cbc
51
47
* aes192-cbc
52
48
* aes256-cbc
53
-
* aes128-gcm<span></span>@openssh.com (.NET 6 and higher)
54
-
* aes256-gcm<span></span>@openssh.com (.NET 6 and higher)
49
+
* 3des-cbc
55
50
* blowfish-cbc
56
51
* twofish-cbc
57
52
* twofish192-cbc
@@ -61,8 +56,6 @@ the missing test once you figure things out. 🤓
61
56
* arcfour128
62
57
* arcfour256
63
58
* cast128-cbc
64
-
* aes128-ctr
65
-
* aes192-ctr
66
59
67
60
## Key Exchange Method
68
61
@@ -82,10 +75,10 @@ the missing test once you figure things out. 🤓
82
75
## Public Key Authentication
83
76
84
77
**SSH.NET** supports the following private key formats:
85
-
* RSA in OpenSSL PEM and ssh.com format
86
-
* DSA in OpenSSL PEM and ssh.com format
87
-
* ECDSA 256/384/521 in OpenSSL PEM format
88
-
* ECDSA 256/384/521, ED25519 and RSA in OpenSSH key format
78
+
* RSA in OpenSSL PEM ("BEGIN RSA PRIVATE KEY") and ssh.com ("BEGIN SSH2 ENCRYPTED PRIVATE KEY") format
79
+
* DSA in OpenSSL PEM ("BEGIN DSA PRIVATE KEY") and ssh.com ("BEGIN SSH2 ENCRYPTED PRIVATE KEY") format
80
+
* ECDSA 256/384/521 in OpenSSL PEM format ("BEGIN EC PRIVATE KEY")
81
+
* ECDSA 256/384/521, ED25519 and RSA in OpenSSH key format ("BEGIN OPENSSH PRIVATE KEY")
89
82
90
83
Private keys can be encrypted using one of the following cipher methods:
91
84
* DES-EDE3-CBC
@@ -110,21 +103,20 @@ Private keys can be encrypted using one of the following cipher methods:
110
103
## Message Authentication Code
111
104
112
105
**SSH.NET** supports the following MAC algorithms:
113
-
* hmac-md5
114
-
* hmac-md5-96
115
-
* hmac-sha1
116
-
* hmac-sha1-96
117
106
* hmac-sha2-256
118
-
* hmac-sha2-256-96
119
107
* hmac-sha2-512
120
108
* hmac-sha2-512-96
121
-
* hmac-md5-etm<span></span>@openssh.com
122
-
* hmac-md5-96-etm<span></span>@openssh.com
123
-
* hmac-sha1-etm<span></span>@openssh.com
124
-
* hmac-sha1-96-etm<span></span>@openssh.com
109
+
* hmac-sha2-256-96
110
+
* hmac-sha1
111
+
* hmac-sha1-96
112
+
* hmac-md5
113
+
* hmac-md5-96
125
114
* hmac-sha2-256-etm<span></span>@openssh.com
126
115
* hmac-sha2-512-etm<span></span>@openssh.com
127
-
116
+
* hmac-sha1-etm<span></span>@openssh.com
117
+
* hmac-sha1-96-etm<span></span>@openssh.com
118
+
* hmac-md5-etm<span></span>@openssh.com
119
+
* hmac-md5-96-etm<span></span>@openssh.com
128
120
129
121
## Compression
130
122
@@ -174,6 +166,10 @@ using (var client = new SshClient("sftp.foo.com", "guest", "pwd"))
174
166
}
175
167
```
176
168
169
+
## Building the library
170
+
171
+
The library has no special requirements to build, other than an up-to-date .NET SDK. See also [CONTRIBUTING.md](https://github.com/sshnet/SSH.NET/blob/develop/CONTRIBUTING.md).
172
+
177
173
## Supporting SSH.NET
178
174
179
175
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](https://github.com/sponsors/sshnet) through GitHub Sponsors.
0 commit comments