pallet.ssh.execute documentation

Execution of pallet actions via ssh

authentication

fn

[session]

Return the user to use for authentication. This is not necessarily the admin user (e.g. when bootstrapping, it is the image user).

ssh-from-local

fn

[session value]

Transfer a file from the origin machine to the target via ssh.

ssh-script-on-target

fn

[session {:keys [context node-value-path], :as action} action-type [options script]]

Execute a bash action on the target via ssh.

ssh-to-local

fn

[session value]

Transfer a file from the target machine to the origin via ssh.

with-connection

macro

[session [connection] & body]

Execute the body with a connection to the current target node,

with-connection*

fn

[session f]

Execute a function with a connection to the current target node,

with-ssh-tunnel

macro

[transport session tunnels & body]

Execute the body with an ssh-tunnel available for the ports given in the tunnels map. Automatically closes port forwards on completion.

Tunnels should be a map from local ports (integers) to either 1) An integer remote port. Remote host is assumed to be "localhost". 2) A vector of remote host and remote port. eg, ["yahoo.com" 80].

e.g. (with-ssh-tunnel session {2222 22} ;; do something on local port 2222 session)