(authorize-known-host! source-machine target-machine)Adds the target machine's hostname/IP SSH host keys to the source machine's known_hosts.
Adds the target machine's hostname/IP SSH host keys to the source machine's known_hosts.
(authorize-public-key! machine public-key)Appends a public key to the target machine's authorized_keys when it is not already present.
Appends a public key to the target machine's authorized_keys when it is not already present.
(build-machine-id {:keys [ssh-user ip]})Builds a human-readable SSH identifier like user@host for logging and diagnostics.
Builds a human-readable SSH identifier like user@host for logging and diagnostics.
(build-session {:keys [ssh-user ip auth-type auth-secret]})Creates and configures a JSch SSH session for the given machine.
Creates and configures a JSch SSH session for the given machine.
(connection-options machine)Builds normalized SSH connection options for a machine map.
Supported auth types are:
Builds normalized SSH connection options for a machine map. Supported auth types are: - "password" with :auth-secret as the password - "private-key" with :auth-secret as a readable private key path
(current-os-user)Returns the current OS user name for the running JVM process.
Returns the current OS user name for the running JVM process.
(ensure-command-succeeded! message machine context result)Throws an ex-info when a machine command exits with a non-zero status.
Throws an ex-info when a machine command exits with a non-zero status.
(ensure-ssh-keypair! machine)Ensures that the target machine has an RSA SSH keypair ready for mesh setup.
Ensures that the target machine has an RSA SSH keypair ready for mesh setup.
(exec-machine machine cmd)Executes a shell command locally for localhost targets, otherwise over SSH.
Executes a shell command locally for localhost targets, otherwise over SSH.
(exec-remote-command machine cmd)Executes a shell command on a remote machine over SSH.
Executes a shell command on a remote machine over SSH.
(known-host-authorization-command host)Builds the shell command that adds a host entry to ~/.ssh/known_hosts when needed.
Builds the shell command that adds a host entry to ~/.ssh/known_hosts when needed.
(known-host-identifiers {:keys [hostname ip]})Returns the distinct hostname/IP values that should be added to known_hosts.
Returns the distinct hostname/IP values that should be added to known_hosts.
(localhost-machine? machine)Returns true when the machine should be treated as the local host.
Returns true when the machine should be treated as the local host.
(machine-sort-key machine)Builds a stable sort key for machine ordering, preferring explicit ids when present.
Builds a stable sort key for machine ordering, preferring explicit ids when present.
(non-blank-string value)Returns a trimmed string when the input contains non-whitespace characters.
Returns a trimmed string when the input contains non-whitespace characters.
(passwordless-group-key {:keys [ssh-user auth-type auth-secret]})Builds the grouping key used to cluster machines by compatible SSH auth details.
Builds the grouping key used to cluster machines by compatible SSH auth details.
(private-key-path secret)Normalizes and validates a private key path, returning it only when readable.
Normalizes and validates a private key path, returning it only when readable.
(read-public-key! machine)Reads and returns the public key from the target machine's default SSH keypair.
Reads and returns the public key from the target machine's default SSH keypair.
(setup-passwordless-group! machines)Validates and applies passwordless SSH setup for one grouped set of compatible machines.
Validates and applies passwordless SSH setup for one grouped set of compatible machines.
(setup-passwordless-group-via-ssh! machines)Bootstraps passwordless SSH for one already-compatible group of machines.
Bootstraps passwordless SSH for one already-compatible group of machines.
(setup-passwordless-mesh! machines)Groups machines by compatible SSH authentication details and bootstraps passwordless SSH within each eligible group.
Groups machines by compatible SSH authentication details and bootstraps passwordless SSH within each eligible group.
(shell-quote s)Safely single-quotes a string for inclusion in a shell command.
Safely single-quotes a string for inclusion in a shell command.
(stream->string stream)Reads an input stream fully into a UTF-8 string.
Reads an input stream fully into a UTF-8 string.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |