lmssh

lmssh is a static executable bundling OpenSSH 10.6p1 (ssh, sftp, scp, ssh-keygen) with an embedded LMScript bytecode VM for remote fleet automation and key management. It supports direct OpenSSH CLI invocation, parallel host fan-out, SFTP transfers, SSH CA signing, and standard lmcode_std_v3 REST and CLI interfaces.

Quick reference

npm install -g @lmctl-ai/lmctl@latest
lmssh --version
lmssh ssh -V
lmssh --lmcode-schema
lmssh --lmcode-signatures
Interface or flagSignature or syntaxPurpose
CLI host bytecodelmssh [--dry-run] --lmcode prog.dslb [-- args...]Execute or dry-run compiled LMScript bytecode against the embedded lmssh schema.
CLI schema and signatureslmssh --lmcode-schema [--json] | --lmcode-signaturesPrint human-readable schema summary, raw schema JSON bytes, or all 334 canonical signatures.
Embedded OpenSSH toolslmssh ssh | sftp | scp | ssh-keygen [args...]Run unmodified OpenSSH 10.6p1 client tools directly or via symlinked argv[0] names.
context ssh: Sshssh.connect(dest) -> Session | ssh.each(dests, cmd) -> ResultListConfigure global SSH defaults, open per-host sessions, or fan out commands in parallel across a fleet.
Sessions.exec(cmd) -> Result | s.put(local, remote) | s.get(remote, local) | s.sftp(batch)Execute remote commands, transfer files and directories via SCP/SFTP, or inspect remote paths.
context keys: Keyskeys.generate(path, type, comment, pw) -> Key | keys.certify(...) | keys.sign(...)Generate SSH keys, issue CA certificates, sign and verify artifacts, and manage known_hosts files.
context io: Io / report: Reportio.args() | io.temp_dir() | io.sha256(path) | report.add(...) | report.fail_if_any()Read CLI arguments, manage temporary directories, hash files, and emit structured text or JSON reports.
Standard REST and CLIRestGet..RestOptions, RestHandler, CliCommand, CliOptionExpose _lmcode_ functions as HTTP routes (:param) or stateless CLI flags and commands via rest_serve and rest_cli.
p = _lmcode_ cli="lmssh" install="github:lmctl-ai/lmssh@latest";
let dir = io.temp_dir();
let k = keys.generate(dir + "/deploy_ed25519", "ed25519", "deploy@lmssh", "");
assert_eq(k.type(), "ed25519");
assert_eq(k.bits(), 256);

@"/key/fingerprint"
fn get_fp(x: RestExchange) -> void implements RestGet {
  x.json("{\"type\":\"" + k.type() + "\",\"fp\":\"" + k.fingerprint() + "\"}");
}
assert_eq(str_contains(rest_cli(str_split("/key/fingerprint", " ")), "SHA256:"), true);
end _lmcode_
res = run_lmcode(p);
require(res.ok, json_stringify(res));

Documentation pages

Source repository and releases