@zero-transfer/ssh 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -0
- package/dist/index.cjs +7832 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +3778 -0
- package/dist/index.d.ts +3778 -0
- package/dist/index.mjs +7720 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# @zero-transfer/ssh
|
|
2
|
+
|
|
3
|
+
> Zero-dependency SSH 2.0 transport, auth, and channel primitives.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @zero-transfer/ssh
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Standalone, zero-dependency SSH 2.0 stack — RFC 4253 transport (curve25519-sha256 KEX, AES-CTR + HMAC-SHA2), RFC 4252 user authentication (password, keyboard-interactive, publickey for Ed25519 / RSA-SHA2-256/512), RFC 5656 ECDSA host keys (P-256/384/521), RFC 4254 channels, OpenSSH `known_hosts` parsing, and host-key pinning. The same protocol stack that powers the SFTP provider, exposed for callers that need direct SSH features (custom subsystems, exec channels, port forwarding, custom RPC) — capabilities the Node.js ecosystem otherwise lacks a maintained pure-JS solution for.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import {
|
|
19
|
+
SshTransportConnection,
|
|
20
|
+
SshTransportConnectionOptions,
|
|
21
|
+
SshTransportHandshake,
|
|
22
|
+
} from "@zero-transfer/ssh";
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Public surface
|
|
26
|
+
|
|
27
|
+
This package publishes a narrowed surface of **23** exports. These symbols are also available from [`@zero-transfer/sdk`](https://www.npmjs.com/package/@zero-transfer/sdk); the table below links into the full API reference:
|
|
28
|
+
|
|
29
|
+
| Symbol | Kind | Notes |
|
|
30
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------ |
|
|
31
|
+
| [`SshTransportConnection`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/SshTransportConnection.md) | Class | See API reference. |
|
|
32
|
+
| [`SshTransportConnectionOptions`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/SshTransportConnectionOptions.md) | Interface | See API reference. |
|
|
33
|
+
| [`SshTransportHandshake`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/SshTransportHandshake.md) | Class | See API reference. |
|
|
34
|
+
| [`SshTransportHandshakeResult`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/SshTransportHandshakeResult.md) | Interface | See API reference. |
|
|
35
|
+
| [`SshDisconnectReason`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/type-aliases/SshDisconnectReason.md) | Type | See API reference. |
|
|
36
|
+
| [`SshAlgorithmPreferences`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/SshAlgorithmPreferences.md) | Interface | See API reference. |
|
|
37
|
+
| [`NegotiatedSshAlgorithms`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/NegotiatedSshAlgorithms.md) | Interface | See API reference. |
|
|
38
|
+
| [`DEFAULT_SSH_ALGORITHM_PREFERENCES`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/variables/DEFAULT_SSH_ALGORITHM_PREFERENCES.md) | Variable | See API reference. |
|
|
39
|
+
| [`negotiateSshAlgorithms`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/negotiateSshAlgorithms.md) | Function | See API reference. |
|
|
40
|
+
| [`SshAuthSession`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/SshAuthSession.md) | Class | See API reference. |
|
|
41
|
+
| [`SshPasswordCredential`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/SshPasswordCredential.md) | Interface | See API reference. |
|
|
42
|
+
| [`SshPublickeyCredential`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/SshPublickeyCredential.md) | Interface | See API reference. |
|
|
43
|
+
| [`SshKeyboardInteractiveCredential`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/SshKeyboardInteractiveCredential.md) | Interface | See API reference. |
|
|
44
|
+
| [`buildPublickeyCredential`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/buildPublickeyCredential.md) | Function | See API reference. |
|
|
45
|
+
| [`SshConnectionManager`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/SshConnectionManager.md) | Class | See API reference. |
|
|
46
|
+
| [`SshSessionChannel`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/SshSessionChannel.md) | Class | See API reference. |
|
|
47
|
+
| [`SshDataReader`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/SshDataReader.md) | Class | See API reference. |
|
|
48
|
+
| [`SshDataWriter`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/classes/SshDataWriter.md) | Class | See API reference. |
|
|
49
|
+
| [`parseKnownHosts`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/parseKnownHosts.md) | Function | See API reference. |
|
|
50
|
+
| [`matchKnownHosts`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/matchKnownHosts.md) | Function | See API reference. |
|
|
51
|
+
| [`matchKnownHostsEntry`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/matchKnownHostsEntry.md) | Function | See API reference. |
|
|
52
|
+
| [`KnownHostsEntry`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/KnownHostsEntry.md) | Interface | See API reference. |
|
|
53
|
+
| [`KnownHostsMarker`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/type-aliases/KnownHostsMarker.md) | Type | See API reference. |
|
|
54
|
+
|
|
55
|
+
## Examples
|
|
56
|
+
|
|
57
|
+
| Example | What it shows |
|
|
58
|
+
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
59
|
+
| [`examples/sftp-private-key.ts`](https://github.com/tonywied17/zero-transfer/blob/main/examples/sftp-private-key.ts) | SFTP private-key authentication example with host-key pinning. |
|
|
60
|
+
|
|
61
|
+
## Documentation
|
|
62
|
+
|
|
63
|
+
- [Scope page](https://github.com/tonywied17/zero-transfer/blob/main/docs/scopes/ssh.md)
|
|
64
|
+
- [Top-level README](https://github.com/tonywied17/zero-transfer/blob/main/README.md)
|
|
65
|
+
- [Full API reference](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/README.md)
|
|
66
|
+
- [Capability matrix](https://github.com/tonywied17/zero-transfer/blob/main/README.md#capability-matrix)
|
|
67
|
+
- [Examples](https://github.com/tonywied17/zero-transfer/tree/main/examples)
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT © [Tony Wiedman](https://github.com/tonywied17)
|