pod.epiccastle.bbssh.host-key

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

get-comment

(get-comment host-key)

Returns the comment associated with the key.

get-finger-print

(get-finger-print host-key agent)

Returns the fingerprint of the key.

get-host

(get-host host-key)

Returns the hostname for the host-key.

get-info

(get-info host-key agent)

Returns all the associated information of the key as a single hashmap with keys :host, :type, :key, :finger-print, :comment and :marker.

get-infos

(get-infos host-keys agent)

Given a sequence of host-key references and the bbssh agent reference, return a hashmap of all the info for all the keys. The keys are the host-key references and the values are as would be returned from get-info.

get-key

(get-key host-key)

Returns the key as a base64 encoded string.

get-marker

(get-marker host-key)

Returns any @ marker associated with the key. If no marker is associated returns the empty string.

get-type

(get-type host-key)

Returns the key type string for the host-key. "ssh-rsa", "ssh-dss", "ecdsa-sha2-nistp256" or "ssh-ed25519".

new

(new host key)(new host type key)(new host type key comment)(new marker host type key comment)

Create a new host-key with some subset of:

  • host: A string of the hostname.
  • key: A byte array of the public key.
  • type: One of :unknown, :guess, :sshdss, :sshrsa, :ecdsa256, :ecdsa384, :ecdsa521, :ed25519 or :ed448. If uknown value passed, defaults to :guess which tries to guess the key type.
  • comment: A string comment for the key.
  • marker: A string marker for the key.