API reference
Generated from the XML documentation comments, which IntelliSense shows too. Start with SshClient, SshClientOptions and SshConfigConnectOptions.
| Namespace | Package | Contents |
|---|---|---|
| SshSharp | SshSharp |
SshClient and its options, sessions, forwarding, proxies, keys, certificates, signatures, the SSH agent, host key verification and exceptions. |
| SshSharp.Config | SshSharp |
ssh_config and known_hosts parsing and resolution. |
| SshSharp.Sftp | SshSharp |
The SFTP client (client.OpenSftpAsync()). |
| SshSharp.Scp | SshSharp |
SCP uploads and downloads (extension methods on SshClient). |
| SshSharp.Extensions.DependencyInjection | SshSharp.Extensions.DependencyInjection |
SshEndpointOptions, ISshClientFactory and ISshConnectionProvider. AddSshClient and the AddSsh health check are in Microsoft.Extensions.DependencyInjection. |
| SshSharp.IO.Abstractions | SshSharp.IO.Abstractions |
SftpFileSystem, SFTP as a System.IO.Abstractions IFileSystem. |
| SshSharp.FileProviders | SshSharp.FileProviders |
SftpFileProvider, a remote directory as an IFileProvider. |
Most used types
| Task | Types |
|---|---|
| Connect | SshClient, SshClientOptions, SshConfigConnectOptions, SshProxy |
| Verify the server | KnownHostsVerifier, SshHostKeyVerifier, SshHostKey |
| Authenticate | SshPrivateKey, SshAgent, SshCertificate, SshKeySigner, SshGssapiOptions |
| Run programs | SshCommandResult, SshSession, SshSessionOptions, SshExpect |
| Transfer files | SftpClient, SftpTransferOptions, SshScpExtensions |
| Forward ports | SshLocalPortForwarder, SshRemotePortForwarder, SshDynamicPortForwarder |
| Handle errors | SshException, SshFailureReason |
| Configuration files | SshConfig, SshHostConfig, KnownHostsFile |
For explanations and examples, see the documentation.