pallet.ssh.credentials documentation

Functions for working with ssh credentials.

ensure-ssh-credential

fn

[{:keys [private-key-path public-key-path], :as user} {:keys [comment key-type key-size passphrase], :as options}]

Given a user map, ensure credentials exist at the specified :private-key-path and :public-key-path. Logs and prints any issues found with the credentials.

Returns a keyword indicating the credentials' status.

  • :not-found
  • :private-key-not-found
  • :public-key-not-found
  • :invalid-key
  • :valid-key

generate-keypair-files

fn

[{:keys [private-key-path public-key-path], :as user} {:keys [comment key-type key-size passphrase], :or {key-type :rsa, key-size 2048}, :as options}]

Generate keypair files for the given user and options

ssh-credential-status

fn

[{:keys [password private-key private-key-path public-key-path], :as user}]

Given a user map, returns a keyword indicating the credentials' status.

  • :not-found
  • :private-key-not-found
  • :public-key-not-found
  • :invalid-key
  • :valid-key