Liking cljdoc? Tell your friends :D

passwordless-ssh.core


authorize-known-host!clj

(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.
sourceraw docstring

authorize-public-key!clj

(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.
sourceraw docstring

build-machine-idclj

(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.
sourceraw docstring

build-sessionclj

(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.
sourceraw docstring

connection-optionsclj

(connection-options machine)

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
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
sourceraw docstring

current-os-userclj

(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.
sourceraw docstring

ensure-command-succeeded!clj

(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.
sourceraw docstring

ensure-ssh-keypair!clj

(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.
sourceraw docstring

exec-machineclj

(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.
sourceraw docstring

exec-remote-commandclj

(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.
sourceraw docstring

known-host-authorization-commandclj

(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.
sourceraw docstring

known-host-identifiersclj

(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.
sourceraw docstring

localhost-machine?clj

(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.
sourceraw docstring

machine-sort-keyclj

(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.
sourceraw docstring

non-blank-stringclj

(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.
sourceraw docstring

passwordless-group-keyclj

(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.
sourceraw docstring

private-key-pathclj

(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.
sourceraw docstring

read-public-key!clj

(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.
sourceraw docstring

setup-passwordless-group!clj

(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.
sourceraw docstring

setup-passwordless-group-via-ssh!clj

(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.
sourceraw docstring

setup-passwordless-mesh!clj

(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.
sourceraw docstring

shell-quoteclj

(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.
sourceraw docstring

stream->stringclj

(stream->string stream)

Reads an input stream fully into a UTF-8 string.

Reads an input stream fully into a UTF-8 string.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close