| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,48 @@ | |||
| 1 | + name: Docs | ||
| 2 | + | ||
| 3 | + on: | ||
| 4 | + push: | ||
| 5 | + branches: ["master"] | ||
| 6 | + workflow_dispatch: | ||
| 7 | + | ||
| 8 | + permissions: | ||
| 9 | + contents: read | ||
| 10 | + pages: write | ||
| 11 | + id-token: write | ||
| 12 | + | ||
| 13 | + concurrency: | ||
| 14 | + group: "pages" | ||
| 15 | + cancel-in-progress: false | ||
| 16 | + | ||
| 17 | + jobs: | ||
| 18 | + deploy: | ||
| 19 | + environment: | ||
| 20 | + name: github-pages | ||
| 21 | + url: ${{ steps.deployment.outputs.page_url }} | ||
| 22 | + runs-on: ubuntu-latest | ||
| 23 | + steps: | ||
| 24 | + - name: Checkout repository | ||
| 25 | + uses: actions/checkout@v4 | ||
| 26 | + | ||
| 27 | + - name: Setup Pages | ||
| 28 | + uses: actions/configure-pages@v4 | ||
| 29 | + | ||
| 30 | + - name: Setup .NET 8.0 | ||
| 31 | + uses: actions/setup-dotnet@v4 | ||
| 32 | + with: | ||
| 33 | + dotnet-version: 8.x | ||
| 34 | + | ||
| 35 | + - name: Setup docfx | ||
| 36 | + run: dotnet tool update -g docfx | ||
| 37 | + | ||
| 38 | + - name: Build documentation | ||
| 39 | + run: docfx ./docfx/docfx.json | ||
| 40 | + | ||
| 41 | + - name: Upload documentation | ||
| 42 | + uses: actions/upload-pages-artifact@v3 | ||
| 43 | + with: | ||
| 44 | + path: './docfx/_site' | ||
| 45 | + | ||
| 46 | + - name: Deploy to GitHub Pages | ||
| 47 | + id: deployment | ||
| 48 | + uses: actions/deploy-pages@v4 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -485,3 +485,12 @@ $RECYCLE.BIN/ | |||
| 485 | 485 | ||
| 486 | 486 | # Build outputs | |
| 487 | 487 | build/target/ | |
| 488 | + | ||
| 489 | + # Docs | ||
| 490 | + docfx/_site/** | ||
| 491 | + docfx/net462/** | ||
| 492 | + docfx/netstandard2.0/** | ||
| 493 | + docfx/netstandard2.1/** | ||
| 494 | + docfx/net6.0/** | ||
| 495 | + docfx/net7.0/** | ||
| 496 | + docfx/net8.0/** | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,11 +7,13 @@ SSH.NET is a Secure Shell (SSH-2) library for .NET, optimized for parallelism. | |||
| 7 | 7 | [](https://ci.appveyor.com/api/projects/status/ih77qu6tap3o92gu/branch/develop) | |
| 8 | 8 | ||
| 9 | 9 | ## Introduction | |
| 10 | + | ||
| 10 | 11 | This project was inspired by **Sharp.SSH** library which was ported from java and it seems like was not supported | |
| 11 | 12 | for quite some time. This library is a complete rewrite, without any third party dependencies, using parallelism | |
| 12 | 13 | to achieve the best performance possible. | |
| 13 | 14 | ||
| 14 | 15 | ## Documentation | |
| 16 | + | ||
| 15 | 17 | There is MSDN-style class documentation in a .chm file for each release, which you can find in the Assets section | |
| 16 | 18 | of the [latest release](https://github.com/sshnet/SSH.NET/releases/latest) page. Please note that you will need | |
| 17 | 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) | |
@@ -26,6 +28,7 @@ invited to read the source, Luke, and highly encouraged to generate a pull reque | |||
| 26 | 28 | the missing test once you figure things out. 🤓 | |
| 27 | 29 | ||
| 28 | 30 | ## Features | |
| 31 | + | ||
| 29 | 32 | * Execution of SSH command using both synchronous and asynchronous methods | |
| 30 | 33 | * Return command execution exit status and other information | |
| 31 | 34 | * Provide SFTP functionality for both synchronous and asynchronous operations | |
@@ -121,6 +124,7 @@ Private keys can be encrypted using one of the following cipher methods: | |||
| 121 | 124 | * hmac-sha2-512-etm<span></span>@openssh.com | |
| 122 | 125 | ||
| 123 | 126 | ## Framework Support | |
| 127 | + | ||
| 124 | 128 | **SSH.NET** supports the following target frameworks: | |
| 125 | 129 | * .NETFramework 4.6.2 (and higher) | |
| 126 | 130 | * .NET Standard 2.0 and 2.1 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,124 @@ | |||
| 1 | + { | ||
| 2 | + "metadata": [ | ||
| 3 | + { | ||
| 4 | + "src": [ | ||
| 5 | + { | ||
| 6 | + "src": "../src", | ||
| 7 | + "files": [ | ||
| 8 | + "**/*.csproj" | ||
| 9 | + ] | ||
| 10 | + } | ||
| 11 | + ], | ||
| 12 | + "outputFormat": "apiPage", | ||
| 13 | + "dest": "net462", | ||
| 14 | + "properties": { | ||
| 15 | + "TargetFramework": "net462" | ||
| 16 | + } | ||
| 17 | + }, | ||
| 18 | + { | ||
| 19 | + "src": [ | ||
| 20 | + { | ||
| 21 | + "src": "../src", | ||
| 22 | + "files": [ | ||
| 23 | + "**/*.csproj" | ||
| 24 | + ] | ||
| 25 | + } | ||
| 26 | + ], | ||
| 27 | + "outputFormat": "apiPage", | ||
| 28 | + "dest": "netstandard2.0", | ||
| 29 | + "properties": { | ||
| 30 | + "TargetFramework": "netstandard2.0" | ||
| 31 | + } | ||
| 32 | + }, | ||
| 33 | + { | ||
| 34 | + "src": [ | ||
| 35 | + { | ||
| 36 | + "src": "../src", | ||
| 37 | + "files": [ | ||
| 38 | + "**/*.csproj" | ||
| 39 | + ] | ||
| 40 | + } | ||
| 41 | + ], | ||
| 42 | + "outputFormat": "apiPage", | ||
| 43 | + "dest": "netstandard2.1", | ||
| 44 | + "properties": { | ||
| 45 | + "TargetFramework": "netstandard2.1" | ||
| 46 | + } | ||
| 47 | + }, | ||
| 48 | + { | ||
| 49 | + "src": [ | ||
| 50 | + { | ||
| 51 | + "src": "../src", | ||
| 52 | + "files": [ | ||
| 53 | + "**/*.csproj" | ||
| 54 | + ] | ||
| 55 | + } | ||
| 56 | + ], | ||
| 57 | + "outputFormat": "apiPage", | ||
| 58 | + "dest": "net6.0", | ||
| 59 | + "properties": { | ||
| 60 | + "TargetFramework": "net6.0" | ||
| 61 | + } | ||
| 62 | + }, | ||
| 63 | + { | ||
| 64 | + "src": [ | ||
| 65 | + { | ||
| 66 | + "src": "../src", | ||
| 67 | + "files": [ | ||
| 68 | + "**/*.csproj" | ||
| 69 | + ] | ||
| 70 | + } | ||
| 71 | + ], | ||
| 72 | + "outputFormat": "apiPage", | ||
| 73 | + "dest": "net7.0", | ||
| 74 | + "properties": { | ||
| 75 | + "TargetFramework": "net7.0" | ||
| 76 | + } | ||
| 77 | + }, | ||
| 78 | + { | ||
| 79 | + "src": [ | ||
| 80 | + { | ||
| 81 | + "src": "../src", | ||
| 82 | + "files": [ | ||
| 83 | + "**/*.csproj" | ||
| 84 | + ] | ||
| 85 | + } | ||
| 86 | + ], | ||
| 87 | + "outputFormat": "apiPage", | ||
| 88 | + "dest": "net8.0", | ||
| 89 | + "properties": { | ||
| 90 | + "TargetFramework": "net8.0" | ||
| 91 | + } | ||
| 92 | + } | ||
| 93 | + ], | ||
| 94 | + "build": { | ||
| 95 | + "content": [ | ||
| 96 | + { | ||
| 97 | + "files": "**/*.{md,yml}", | ||
| 98 | + "exclude": [ | ||
| 99 | + "_site/**" | ||
| 100 | + ] | ||
| 101 | + } | ||
| 102 | + ], | ||
| 103 | + "resource": [ | ||
| 104 | + { | ||
| 105 | + "files": [ | ||
| 106 | + "images/**" | ||
| 107 | + ] | ||
| 108 | + } | ||
| 109 | + ], | ||
| 110 | + "output": "_site", | ||
| 111 | + "template": [ | ||
| 112 | + "default", | ||
| 113 | + "modern" | ||
| 114 | + ], | ||
| 115 | + "globalMetadata": { | ||
| 116 | + "_appName": "SSH.NET", | ||
| 117 | + "_appTitle": "SSH.NET - A Secure Shell (SSH) library for .NET, optimized for parallelism", | ||
| 118 | + "_appLogoPath": "images/logo.png", | ||
| 119 | + "_appFaviconPath": "images/icon.png", | ||
| 120 | + "_appFooter": "Copyright (c) Renci, Oleg Kapeljushnik, Gert Driesen and contributors", | ||
| 121 | + "_enableSearch": true | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,102 @@ | |||
| 1 | + # Features | ||
| 2 | + | ||
| 3 | + * Execution of SSH command using both synchronous and asynchronous methods | ||
| 4 | + * Return command execution exit status and other information | ||
| 5 | + * Provide SFTP functionality for both synchronous and asynchronous operations | ||
| 6 | + * Provides SCP functionality | ||
| 7 | + * Provide status report for upload and download sftp operations to allow accurate progress bar implementation | ||
| 8 | + * Remote, dynamic and local port forwarding | ||
| 9 | + * Shell/Terminal implementation | ||
| 10 | + * Specify key file pass phrase | ||
| 11 | + * Use multiple key files to authenticate | ||
| 12 | + * Supports publickey, password and keyboard-interactive authentication methods | ||
| 13 | + * Supports two-factor or higher authentication | ||
| 14 | + * Supports SOCKS4, SOCKS5 and HTTP Proxy | ||
| 15 | + | ||
| 16 | + ## Encryption Method | ||
| 17 | + | ||
| 18 | + **SSH.NET** supports the following encryption methods: | ||
| 19 | + * aes256-ctr | ||
| 20 | + * 3des-cbc | ||
| 21 | + * aes128-cbc | ||
| 22 | + * aes192-cbc | ||
| 23 | + * aes256-cbc | ||
| 24 | + * blowfish-cbc | ||
| 25 | + * twofish-cbc | ||
| 26 | + * twofish192-cbc | ||
| 27 | + * twofish128-cbc | ||
| 28 | + * twofish256-cbc | ||
| 29 | + * arcfour | ||
| 30 | + * arcfour128 | ||
| 31 | + * arcfour256 | ||
| 32 | + * cast128-cbc | ||
| 33 | + * aes128-ctr | ||
| 34 | + * aes192-ctr | ||
| 35 | + | ||
| 36 | + ## Key Exchange Method | ||
| 37 | + | ||
| 38 | + **SSH.NET** supports the following key exchange methods: | ||
| 39 | + * curve25519-sha256 | ||
| 40 | + * curve25519-sha256<span></span>@libssh.org | ||
| 41 | + * ecdh-sha2-nistp256 | ||
| 42 | + * ecdh-sha2-nistp384 | ||
| 43 | + * ecdh-sha2-nistp521 | ||
| 44 | + * diffie-hellman-group-exchange-sha256 | ||
| 45 | + * diffie-hellman-group-exchange-sha1 | ||
| 46 | + * diffie-hellman-group16-sha512 | ||
| 47 | + * diffie-hellman-group14-sha256 | ||
| 48 | + * diffie-hellman-group14-sha1 | ||
| 49 | + * diffie-hellman-group1-sha1 | ||
| 50 | + | ||
| 51 | + ## Public Key Authentication | ||
| 52 | + | ||
| 53 | + **SSH.NET** supports the following private key formats: | ||
| 54 | + * RSA in OpenSSL PEM and ssh.com format | ||
| 55 | + * DSA in OpenSSL PEM and ssh.com format | ||
| 56 | + * ECDSA 256/384/521 in OpenSSL PEM format | ||
| 57 | + * ECDSA 256/384/521, ED25519 and RSA in OpenSSH key format | ||
| 58 | + | ||
| 59 | + Private keys can be encrypted using one of the following cipher methods: | ||
| 60 | + * DES-EDE3-CBC | ||
| 61 | + * DES-EDE3-CFB | ||
| 62 | + * DES-CBC | ||
| 63 | + * AES-128-CBC | ||
| 64 | + * AES-192-CBC | ||
| 65 | + * AES-256-CBC | ||
| 66 | + | ||
| 67 | + ## Host Key Algorithms | ||
| 68 | + | ||
| 69 | + **SSH.NET** supports the following host key algorithms: | ||
| 70 | + * ssh-ed25519 | ||
| 71 | + * ecdsa-sha2-nistp256 | ||
| 72 | + * ecdsa-sha2-nistp384 | ||
| 73 | + * ecdsa-sha2-nistp521 | ||
| 74 | + * rsa-sha2-512 | ||
| 75 | + * rsa-sha2-256 | ||
| 76 | + * ssh-rsa | ||
| 77 | + * ssh-dss | ||
| 78 | + | ||
| 79 | + ## Message Authentication Code | ||
| 80 | + | ||
| 81 | + **SSH.NET** supports the following MAC algorithms: | ||
| 82 | + * hmac-md5 | ||
| 83 | + * hmac-md5-96 | ||
| 84 | + * hmac-sha1 | ||
| 85 | + * hmac-sha1-96 | ||
| 86 | + * hmac-sha2-256 | ||
| 87 | + * hmac-sha2-256-96 | ||
| 88 | + * hmac-sha2-512 | ||
| 89 | + * hmac-sha2-512-96 | ||
| 90 | + * hmac-md5-etm<span></span>@openssh.com | ||
| 91 | + * hmac-md5-96-etm<span></span>@openssh.com | ||
| 92 | + * hmac-sha1-etm<span></span>@openssh.com | ||
| 93 | + * hmac-sha1-96-etm<span></span>@openssh.com | ||
| 94 | + * hmac-sha2-256-etm<span></span>@openssh.com | ||
| 95 | + * hmac-sha2-512-etm<span></span>@openssh.com | ||
| 96 | + | ||
| 97 | + ## Framework Support | ||
| 98 | + | ||
| 99 | + **SSH.NET** supports the following target frameworks: | ||
| 100 | + * .NETFramework 4.6.2 (and higher) | ||
| 101 | + * .NET Standard 2.0 and 2.1 | ||
| 102 | + * .NET 6 (and higher) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,14 @@ | |||
| 1 | + # Foreword | ||
| 2 | + | ||
| 3 | + There is MSDN-style class documentation in a .chm file for each release, which you can find in the Assets section | ||
| 4 | + of the [latest release](https://github.com/sshnet/SSH.NET/releases/latest) page. Please note that you will need | ||
| 5 | + 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) | ||
| 6 | + the CHM file after you download it. | ||
| 7 | + | ||
| 8 | + Currently (4/18/2020), the documentation is very sparse. Fortunately, there are a large number of tests in | ||
| 9 | + [Renci.SshNet.Tests](https://github.com/sshnet/SSH.NET/tree/develop/test/Renci.SshNet.Tests) that demonstrate | ||
| 10 | + usage with working code. | ||
| 11 | + | ||
| 12 | + If the test for the functionality you would like to see documented is not complete, then you are cordially | ||
| 13 | + invited to read the source, Luke, and highly encouraged to generate a pull request for the implementation of | ||
| 14 | + the missing test once you figure things out. 🤓 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,6 @@ | |||
| 1 | + - name: Foreword | ||
| 2 | + href: foreword.md | ||
| 3 | + - name: Features | ||
| 4 | + href: features.md | ||
| 5 | + - name: Usage | ||
| 6 | + href: usage.md | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,34 @@ | |||
| 1 | + # Usage | ||
| 2 | + | ||
| 3 | + ## Multi-factor authentication | ||
| 4 | + | ||
| 5 | + Establish a SFTP connection using both password and public-key authentication: | ||
| 6 | + | ||
| 7 | + ```cs | ||
| 8 | + var connectionInfo = new ConnectionInfo("sftp.foo.com", | ||
| 9 | + "guest", | ||
| 10 | + new PasswordAuthenticationMethod("guest", "pwd"), | ||
| 11 | + new PrivateKeyAuthenticationMethod("rsa.key")); | ||
| 12 | + using (var client = new SftpClient(connectionInfo)) | ||
| 13 | + { | ||
| 14 | + client.Connect(); | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + ``` | ||
| 18 | + | ||
| 19 | + ## Verify host identify | ||
| 20 | + | ||
| 21 | + Establish a SSH connection using user name and password, and reject the connection if the fingerprint of the server does not match the expected fingerprint: | ||
| 22 | + | ||
| 23 | + ```cs | ||
| 24 | + string expectedFingerPrint = "LKOy5LvmtEe17S4lyxVXqvs7uPMy+yF79MQpHeCs/Qo"; | ||
| 25 | + | ||
| 26 | + using (var client = new SshClient("sftp.foo.com", "guest", "pwd")) | ||
| 27 | + { | ||
| 28 | + client.HostKeyReceived += (sender, e) => | ||
| 29 | + { | ||
| 30 | + e.CanTrust = expectedFingerPrint.Equals(e.FingerPrintSHA256); | ||
| 31 | + }; | ||
| 32 | + client.Connect(); | ||
| 33 | + } | ||
| 34 | + ``` | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments