modus
Menu
On this page

The module ssh_client

Thin library module exposing SSH-2 client framing and validation exports so processes share one verified SSH-2 client implementation.

ssh_client module with no entry

Hash
1c63f5dadad6258f0b64c91e6ef52aff9e4909e090eb9485523d25f7c348f8a3
Size
12288 bytes
Exports
3
Imports
0
Imported by
0
License
MIT

Thin library module exposing SSH-2 client framing and validation exports so processes share one verified SSH-2 client implementation

FactValue
KindModules with no entry
Sourcesrc/modules/libraries/ssh_client
Boot imageyes: in the boot image, 12288 bytes in this build
Build settingsnone: the defaults of the source
Importsnone
Imported bynone

Neighbours

It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.

Exports

ExportWhat it does
client_banner() -> Textwrites the SSH-2 client identification banner ("SSH-2.0-modus\r\n") into result and returns the byte count (or the needed size if result is shorter)
parse_server_banner(input: Text) -> Textvalidates an SSH-2.0 server identification banner and copies the trimmed banner into result
parse_ed25519_host_key(blob: Text) -> Textvalidates an SSH ssh-ed25519 host key blob and writes the 32-byte Ed25519 public key into result, failing with an error record on malformed input

client_banner

client_banner() -> 

client_banner writes the SSH-2 client identification banner ("SSH-2.0-modus\r\n") into result and returns the byte count (or the needed size if result is shorter).

Parameters
none
Result
Source
src/modules/libraries/ssh_client/ssh_client.odin:13

parse_server_banner

parse_server_banner(input: ) -> 

parse_server_banner validates an SSH-2.0 server identification banner and copies the trimmed banner into result. Refuses SSH-1.x, NUL bytes, and oversized banners with an error record.

Parameters
  • input:
Result
When it fails
a negative result, and the error record
Source
src/modules/libraries/ssh_client/ssh_client.odin:30

parse_ed25519_host_key

parse_ed25519_host_key(blob: ) -> 

parse_ed25519_host_key validates an SSH ssh-ed25519 host key blob and writes the 32-byte Ed25519 public key into result, failing with an error record on malformed input.

Parameters
  • blob:
Result
When it fails
a negative result, and the error record
Source
src/modules/libraries/ssh_client/ssh_client.odin:50

Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).

Text wire form

A wire form of the module contract: one word of a call. The address of a slice record {address, count} of UTF-8 bytes.

Error_Record record of a module

A record of the module ssh_client: 56 bytes, aligned on 8 bytes, 0 bytes of padding.

  • kindi6408 bytes
  • uniti6488 bytes
  • operationi64168 bytes
  • argumenti64248 bytes
  • valuei64328 bytes
  • limiti64408 bytes
  • foundi64488 bytes