pallet.crate.ssh-key documentation

Crate functions for manipulating SSH-keys


[session user public-key-string & {:keys [authorize-for-user], :as options}]

Authorize a public key on the specified user.


[session user public-key-string auth-file]

Designed to be used by authorize-key. This is an action to allow passing of delayed arguments for the public-key-string, enabling the authorisation of a key found with record-key.


[session user public-key-filename & {:keys [authorize-for-user], :as options}]

Authorize a user's public key on the specified user, for ssh access to localhost. The :authorize-for-user option can be used to specify the user to who's authorized_keys file is modified.


[session user & {:keys [type file passphrase no-dir comment], :or {type "rsa", passphrase ""}, :as options}]

Generate an ssh key pair for the given user, unless one already exists. Options are: :file path -- output file name (within ~user/.ssh directory) :type key-type -- key type selection :no-dir true -- do note ensure directory exists :passphrase -- new passphrase for encrypring the private key :comment -- comment for new key


[session user key-name private-key-string public-key-string]

Install a ssh private key.


[session user & {:keys [filename type parameter-path], :or {type "rsa"}, :as options}]

Record a public key