pod.epiccastle.bbssh.agent

Creates and calls the various methods of a JSch agent that exists on the pod heap.

add-identity

(add-identity agent private-key-filename)(add-identity agent private-key-filename-or-identity passphrase)(add-identity agent private-key-filename public-key-filename passphrase)(add-identity agent identity-name private-key public-key passphrase)

Add the private key to be used in authentication. Optionally add the public key aswell. Private key can be decrypted with passphrase.

get-config

(get-config key)

Returns the config value for the specified key

get-config-repository

(get-config-repository agent)

Get the current config-repository from the agent.

get-host-key-repository

(get-host-key-repository agent)

Get the current host-key-repository from the agent.

get-identity-names

(get-identity-names agent)

Lists names of identities included in the identity-repository

get-identity-repository

(get-identity-repository agent)

Get the current identity-repository from the agent.

get-session

(get-session agent host)(get-session agent username host)(get-session agent username host port)

Construct a new JSch connection session. Does not start the ssh connection.

new

(new)

Make a new JSch agent. A JSch agent is not an “ssh agent”. It is the base java class that holds and controls the sessions.

remove-all-identities

(remove-all-identities agent)

Removes all identities from the identity-repository.

remove-identity

(remove-identity agent identity)

remove an identity by its name or its reference

set-config

(set-config hashmap)(set-config key value)

Sets or overrides the configuration.

set-config-repository

(set-config-repository agent config-repository)

Set the config-repository the agent should use.

set-debug-fn

(set-debug-fn debug-fn)

set-host-key-repository

(set-host-key-repository agent host-key-repository)

Set the host-key-repository the agent should use.

set-identity-repository

(set-identity-repository agent identity-repository)

Set the identity-repository the agent should use.

set-known-hosts

(set-known-hosts agent filename)

Set the known hosts file location

set-known-hosts-content

(set-known-hosts-content agent content)

Set the known hosts file location