Skip to content

Commit 98982a9

Browse files
authored
Update docs and remove a leftover DSA certificate algorithm (#1632)
* Update docs and remove a leftover DSA certificate algorithm * more cleanup
1 parent 8590508 commit 98982a9

File tree

11 files changed

+19
-150
lines changed

11 files changed

+19
-150
lines changed

README.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ SSH.NET is a Secure Shell (SSH-2) library for .NET, optimized for parallelism.
88

99
## Key Features
1010

11-
* Execution of SSH command using both synchronous and asynchronous methods
11+
* Execution of SSH commands using both synchronous and asynchronous methods
1212
* SFTP functionality for both synchronous and asynchronous operations
1313
* SCP functionality
14-
* Remote, dynamic and local port forwarding
14+
* Remote, dynamic and local port forwarding
1515
* Interactive shell/terminal implementation
16-
* Authentication via publickey, password and keyboard-interactive methods, including multi-factor
16+
* Authentication via public key, password and keyboard-interactive methods, including multi-factor
1717
* Connection via SOCKS4, SOCKS5 or HTTP proxy
1818

1919
## How to Use
@@ -52,12 +52,12 @@ using (var client = new SftpClient("sftp.foo.com", "guest", "pwd"))
5252

5353
The main types provided by this library are:
5454

55-
* Renci.SshNet.SshClient
56-
* Renci.SshNet.SftpClient
57-
* Renci.SshNet.ScpClient
58-
* Renci.SshNet.PrivateKeyFile
59-
* Renci.SshNet.SshCommand
60-
* Renci.SshNet.ShellStream
55+
* [Renci.SshNet.SshClient](https://sshnet.github.io/SSH.NET/api/Renci.SshNet.SshClient.html)
56+
* [Renci.SshNet.SftpClient](https://sshnet.github.io/SSH.NET/api/Renci.SshNet.SftpClient.html)
57+
* [Renci.SshNet.PrivateKeyFile](https://sshnet.github.io/SSH.NET/api/Renci.SshNet.PrivateKeyFile.html)
58+
* [Renci.SshNet.SshCommand](https://sshnet.github.io/SSH.NET/api/Renci.SshNet.SshCommand.html)
59+
* [Renci.SshNet.ForwardedPort](https://sshnet.github.io/SSH.NET/api/Renci.SshNet.ForwardedPort.html)
60+
* [Renci.SshNet.ShellStream](https://sshnet.github.io/SSH.NET/api/Renci.SshNet.ShellStream.html)
6161

6262
## Additional Documentation
6363

@@ -106,11 +106,6 @@ The main types provided by this library are:
106106
* ssh.com format ("BEGIN SSH2 ENCRYPTED PRIVATE KEY")
107107
* OpenSSH key format ("BEGIN OPENSSH PRIVATE KEY")
108108
* PuTTY private key format ("PuTTY-User-Key-File-2", "PuTTY-User-Key-File-3")
109-
* DSA in
110-
* OpenSSL traditional PEM format ("BEGIN DSA PRIVATE KEY")
111-
* OpenSSL PKCS#8 PEM format ("BEGIN PRIVATE KEY", "BEGIN ENCRYPTED PRIVATE KEY")
112-
* ssh.com format ("BEGIN SSH2 ENCRYPTED PRIVATE KEY")
113-
* PuTTY private key format ("PuTTY-User-Key-File-2", "PuTTY-User-Key-File-3")
114109
* ECDSA 256/384/521 in
115110
* OpenSSL traditional PEM format ("BEGIN EC PRIVATE KEY")
116111
* OpenSSL PKCS#8 PEM format ("BEGIN PRIVATE KEY", "BEGIN ENCRYPTED PRIVATE KEY")
@@ -158,7 +153,8 @@ Private keys in PuTTY private key format can be encrypted using the following ci
158153
* rsa-sha2-512
159154
* rsa-sha2-256
160155
* ssh-rsa
161-
* ssh-dss
156+
157+
OpenSSH certificate authentication is supported for all of the above, e.g. ssh-ed25519-cert-v01<span></span>@openssh.com.
162158

163159
## Message Authentication Code
164160

@@ -187,17 +183,17 @@ Private keys in PuTTY private key format can be encrypted using the following ci
187183

188184
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).
189185

190-
## Using Pre-Release NuGet Package
186+
## Using Pre-Release NuGet Packages
191187

192-
If you need an unreleased bugfix or feature, you can use the Pre-Release NuGet packages from the `develop` branch which are published to the [GitHub NuGet Registry](https://github.com/sshnet/SSH.NET/pkgs/nuget/SSH.NET).
193-
In order to pull packages from the registry you first have to create a Personal Access Token with the `read:packages` permissions. Then add a NuGet Source for SSH.NET:
194-
195-
Note: you may have to add `--store-password-in-clear-text` on non-Windows platforms.
188+
Pre-release NuGet packages are published from the `develop` branch to the [GitHub NuGet Registry](https://github.com/sshnet/SSH.NET/pkgs/nuget/SSH.NET).
189+
In order to pull packages from the registry, create a Personal Access Token with the `read:packages` permissions. Then add a package source for SSH.NET:
196190

197191
```
198192
dotnet nuget add source --name SSH.NET --username <username> --password <personalaccesstoken> https://nuget.pkg.github.com/sshnet/index.json
199193
```
200194

195+
Note: you may have to add `--store-password-in-clear-text` on non-Windows platforms.
196+
201197
Then you can add the the package as described [here](https://github.com/sshnet/SSH.NET/pkgs/nuget/SSH.NET).
202198

203199
## Supporting SSH.NET

docfx/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
href: examples.md
55
- name: API
66
href: api/
7+
- name: Logging
8+
href: logging.md

src/Renci.SshNet/ConnectionInfo.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ public ConnectionInfo(string host, int port, string username, ProxyTypes proxyTy
398398
hostAlgs.Add("rsa-sha2-512-cert-v01@openssh.com", data => { var cert = new Certificate(data); return new CertificateHostAlgorithm("rsa-sha2-512-cert-v01@openssh.com", cert, new RsaDigitalSignature((RsaKey)cert.Key, HashAlgorithmName.SHA512), hostAlgs); });
399399
hostAlgs.Add("rsa-sha2-256-cert-v01@openssh.com", data => { var cert = new Certificate(data); return new CertificateHostAlgorithm("rsa-sha2-256-cert-v01@openssh.com", cert, new RsaDigitalSignature((RsaKey)cert.Key, HashAlgorithmName.SHA256), hostAlgs); });
400400
hostAlgs.Add("ssh-rsa-cert-v01@openssh.com", data => { var cert = new Certificate(data); return new CertificateHostAlgorithm("ssh-rsa-cert-v01@openssh.com", cert, hostAlgs); });
401-
hostAlgs.Add("ssh-dss-cert-v01@openssh.com", data => { var cert = new Certificate(data); return new CertificateHostAlgorithm("ssh-dss-cert-v01@openssh.com", cert, hostAlgs); });
402401
hostAlgs.Add("ssh-ed25519", data => new KeyHostAlgorithm("ssh-ed25519", new ED25519Key(new SshKeyData(data))));
403402
hostAlgs.Add("ecdsa-sha2-nistp256", data => new KeyHostAlgorithm("ecdsa-sha2-nistp256", new EcdsaKey(new SshKeyData(data))));
404403
hostAlgs.Add("ecdsa-sha2-nistp384", data => new KeyHostAlgorithm("ecdsa-sha2-nistp384", new EcdsaKey(new SshKeyData(data))));

src/Renci.SshNet/PrivateKeyFile.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ namespace Renci.SshNet
2828
/// <description>RSA in OpenSSL PEM, ssh.com, OpenSSH and PuTTY key format</description>
2929
/// </item>
3030
/// <item>
31-
/// <description>DSA in OpenSSL PEM, ssh.com and PuTTY key format</description>
32-
/// </item>
33-
/// <item>
3431
/// <description>ECDSA 256/384/521 in OpenSSL PEM, OpenSSH and PuTTY key format</description>
3532
/// </item>
3633
/// <item>
@@ -321,7 +318,6 @@ private void Open(Stream privateKey, string? passPhrase)
321318
switch (keyName)
322319
{
323320
case "RSA PRIVATE KEY":
324-
case "DSA PRIVATE KEY":
325321
case "EC PRIVATE KEY":
326322
var cipherName = privateKeyMatch.Result("${cipherName}");
327323
var salt = privateKeyMatch.Result("${salt}");

src/Renci.SshNet/Security/Certificate.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public class Certificate
2222
/// The value is one of the following:
2323
/// <list type="bullet">
2424
/// <item>ssh-rsa-cert-v01@openssh.com</item>
25-
/// <item>ssh-dss-cert-v01@openssh.com</item>
2625
/// <item>ecdsa-sha2-nistp256-cert-v01@openssh.com</item>
2726
/// <item>ecdsa-sha2-nistp384-cert-v01@openssh.com</item>
2827
/// <item>ecdsa-sha2-nistp521-cert-v01@openssh.com</item>
@@ -203,7 +202,7 @@ public IDictionary<string, string> Extensions
203202
/// <summary>
204203
/// The CA key used to sign the certificate.
205204
/// The valid key types for CA keys are ssh-rsa,
206-
/// ssh-dss, ssh-ed25519 and the ECDSA types ecdsa-sha2-nistp256,
205+
/// ssh-ed25519 and the ECDSA types ecdsa-sha2-nistp256,
207206
/// ecdsa-sha2-nistp384, ecdsa-sha2-nistp521. "Chained" certificates, where
208207
/// the signature key type is a certificate type itself are NOT supported.
209208
/// Note that it is possible for a RSA certificate key to be signed by a

test/Renci.SshNet.IntegrationTests/HostKeyFile.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
public sealed class HostKeyFile
44
{
55
public static readonly HostKeyFile Rsa = new HostKeyFile("ssh-rsa", "/etc/ssh/ssh_host_rsa_key", 3072, new byte[] { 0x3d, 0x90, 0xd8, 0x0d, 0xd5, 0xe0, 0xb6, 0x13, 0x42, 0x7c, 0x78, 0x1e, 0x19, 0xa3, 0x99, 0x2b });
6-
public static readonly HostKeyFile Dsa = new HostKeyFile("ssh-dsa", "/etc/ssh/ssh_host_dsa_key", 1024, new byte[] { 0xcc, 0xb4, 0x4c, 0xe1, 0xba, 0x6d, 0x15, 0x79, 0xec, 0xe1, 0x31, 0x9f, 0xc0, 0x4a, 0x07, 0x9d });
76
public static readonly HostKeyFile Ed25519 = new HostKeyFile("ssh-ed25519", "/etc/ssh/ssh_host_ed25519_key", 256, new byte[] { 0xb3, 0xb9, 0xd0, 0x1b, 0x73, 0xc4, 0x60, 0xb4, 0xce, 0xed, 0x06, 0xf8, 0x58, 0x49, 0xa3, 0xda });
87
public static readonly HostKeyFile Ecdsa256 = new HostKeyFile("ecdsa-sha2-nistp256", "/etc/ssh/ssh_host_ecdsa256_key", 256, new byte[] { 0xbe, 0x98, 0xa1, 0x54, 0x91, 0x2c, 0x96, 0xc3, 0x77, 0x39, 0x6e, 0x37, 0x8e, 0x64, 0x26, 0x72 });
98
public static readonly HostKeyFile Ecdsa384 = new HostKeyFile("ecdsa-sha2-nistp384", "/etc/ssh/ssh_host_ecdsa384_key", 384, new byte[] { 0xab, 0xbb, 0x20, 0x07, 0x3c, 0xb2, 0x89, 0x9e, 0x40, 0xfe, 0x32, 0x56, 0xfe, 0xd9, 0x95, 0x0b });

test/Renci.SshNet.IntegrationTests/server/ssh/ssh_host_dsa_key

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/Renci.SshNet.IntegrationTests/user/sshnet/authorized_keys

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOwUDIZh
44
ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBFL5NEL9uRhgkF2q+8m58EvtZq4mDGgcVEzafPRuNIn1018m9KuqNpOQ6d+435n+MRYThe4MUdijSIDuopX2i14Z35oKZ9x2LsV+RxQczjmbnoWZdvgcvdOo6jiJdY7XJw== Key.OPENSSH.ECDSA384.Encrypted
55
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAH9BVM6bRhbELtgdMGsin5lM42R2EWoT+6Akakl5rQy2tHHLIYGLEfaqI+0iUo2V6MxEf9w0hVz6SEsF+yDgyrYPQCIieaB1oBvIl+PZmL1XsuAXs2uMRsNJb4myGU/DiekxqzIPa0LMrBZ4xmErcn5Gazkw1EA0B3HoaW5wj+geI/efQ== Key.OPENSSH.ECDSA521.Encrypted
66
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFdyflleGqSPOhgSYZf7ZQFlG0zEL9VDGC69UbtaaBy Key.OPENSSH.ED25519.Encrypted
7-
ssh-dss AAAAB3NzaC1kc3MAAACBAI8gyHFchkVhkPiwkhkjFDqN6w2nFWTqVy9sLjFs38oEWLMpAw9+c132erUptAhNQ6JZUAVZGllv/3V5hksSDyChe9WY5IfsOlh6X0dcZCwBKysEzQlPyMFqAtbc9uv7oUWNzBfvEbtV6WN/VmcmXf7dyo3EBVXbBFdPl1NKC7W9AAAAFQDY1+bTt7s2iNmYoBE4C9hdWRCyeQAAAIAEtj09ugx/Tdl6bo7X6mX17hcgVgIxcYj5VNONg2k6IHmRFriLviYaS68mIB4SG3jmvvxbXAGqR1bWBUrv90n0wpxxcuuNoCFylJQyuqUkzSsUHb0WMcncZ/tBQt+NJnRB1Zp9sw8n20ocpg3WVPdaXTtc4pk83NYB6ywG6UFPvgAAAIAX+De5dwo33LMl9W8IvA4dY8Q1wshdycAGJzhy+qYF9dCcwD1Pg+4EbPjYPmzJopsVrK97v9QhxyYcXMr/iHhngGwd9nYNzzSKx665vkSjzyeJWpeQ+fvNV3CLItP01ypbUreM+s+Vz1wor5joLKcDS4X0oQ0RIVZNEHnekuLuFg== Key.SSH2.DSA.Encrypted.Des.CBC.12345

test/Renci.SshNet.TestTools.OpenSSH/HostKeyAlgorithm.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public sealed class HostKeyAlgorithm
1616
public static readonly HostKeyAlgorithm RsaSha2512 = new HostKeyAlgorithm("rsa-sha2-512");
1717
public static readonly HostKeyAlgorithm RsaSha2256 = new HostKeyAlgorithm("rsa-sha2-256");
1818
public static readonly HostKeyAlgorithm SshRsa = new HostKeyAlgorithm("ssh-rsa");
19-
public static readonly HostKeyAlgorithm SshDss = new HostKeyAlgorithm("ssh-dss");
2019

2120
public HostKeyAlgorithm(string name)
2221
{

test/Renci.SshNet.TestTools.OpenSSH/PublicKeyAlgorithm.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ public sealed class PublicKeyAlgorithm
99
public static readonly PublicKeyAlgorithm SshRsa = new PublicKeyAlgorithm("ssh-rsa");
1010
public static readonly PublicKeyAlgorithm RsaSha2256 = new PublicKeyAlgorithm("rsa-sha2-256");
1111
public static readonly PublicKeyAlgorithm RsaSha2512 = new PublicKeyAlgorithm("rsa-sha2-512");
12-
public static readonly PublicKeyAlgorithm SshDss = new PublicKeyAlgorithm("ssh-dss");
1312
public static readonly PublicKeyAlgorithm EcdsaSha2Nistp256 = new PublicKeyAlgorithm("ecdsa-sha2-nistp256");
1413
public static readonly PublicKeyAlgorithm EcdsaSha2Nistp384 = new PublicKeyAlgorithm("ecdsa-sha2-nistp384");
1514
public static readonly PublicKeyAlgorithm EcdsaSha2Nistp521 = new PublicKeyAlgorithm("ecdsa-sha2-nistp521");
@@ -18,7 +17,6 @@ public sealed class PublicKeyAlgorithm
1817
public static readonly PublicKeyAlgorithm SshRsaCertV01OpenSSH = new PublicKeyAlgorithm("ssh-rsa-cert-v01@openssh.com");
1918
public static readonly PublicKeyAlgorithm RsaSha2256CertV01OpenSSH = new PublicKeyAlgorithm("rsa-sha2-256-cert-v01@openssh.com");
2019
public static readonly PublicKeyAlgorithm RsaSha2512CertV01OpenSSH = new PublicKeyAlgorithm("rsa-sha2-512-cert-v01@openssh.com");
21-
public static readonly PublicKeyAlgorithm SshDssCertV01OpenSSH = new PublicKeyAlgorithm("ssh-dss-cert-v01@openssh.com");
2220
public static readonly PublicKeyAlgorithm EcdsaSha2Nistp256CertV01OpenSSH = new PublicKeyAlgorithm("ecdsa-sha2-nistp256-cert-v01@openssh.com");
2321
public static readonly PublicKeyAlgorithm EcdsaSha2Nistp384CertV01OpenSSH = new PublicKeyAlgorithm("ecdsa-sha2-nistp384-cert-v01@openssh.com");
2422
public static readonly PublicKeyAlgorithm EcdsaSha2Nistp521CertV01OpenSSH = new PublicKeyAlgorithm("ecdsa-sha2-nistp521-cert-v01@openssh.com");

0 commit comments

Comments
 (0)