package
3.2.0
Repository: https://github.com/juju/utils.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

AddKeys adds the specified ssh keys to the authorized_keys file for user.
ClearClientKeys clears the client keys cached in memory.
Command is a short-cut for DefaultClient.Command.
ConcatAuthorisedKeys will joing two or more authorised keys together to form a string based list of authorised keys that can be read by ssh programs.
Copy is a short-cut for DefaultClient.Copy.
CopyReader sends the reader's data to a file on the remote host over SSH.
DeleteKeys removes the specified ssh keys from the authorized ssh keys file for user.
No description provided by the author
ExecuteCommandOnMachine will execute the command passed through on the host specified.
GenerateKey makes a 4096 bit RSA no-passphrase SSH capable key.
GoCryptoKnownHostsFile returns the known_hosts file used by the golang.org/x/crypto/ssh-based client by default.
KeyFingerprint returns the fingerprint and comment for the specified key in authorized_key format.
ListKeys returns either the full keys or key comments from the authorized ssh keys file for user.
LoadClientKeys loads the client SSH keys from the specified directory, and caches them as a process-wide global.
NewGoCryptoClient creates a new GoCryptoClient.
NewOpenSSHClient creates a new OpenSSHClient.
ParseAuthorisedKey parses a non-comment line from an authorized_keys file and returns the constituent parts.
PrivateKeyFiles returns the filenames of private SSH keys loaded by LoadClientKeys.
PublicKey returns the public key for any private key.
PublicKeyFiles returns the filenames of public SSH keys loaded by LoadClientKeys.
ReplaceKeys writes the specified ssh keys to the authorized_keys file for user, replacing any that are already there.
SetGoCryptoKnownHostsFile returns the known_hosts file used by the golang.org/x/crypto/ssh-based client.
SplitAuthorisedKeys extracts a key slice from the specified key data, by splitting the key data into lines and ignoring comments and blank lines.
StartCommandOnMachine executes the command on the given host.
StripCRReader returns a new io.Reader wrapper that strips carriage returns.
WrapStdin returns the original stdin stream on nix platforms.

# Constants

Any ssh key added to the authorised keys list by Juju will have this prefix.
PublicKeySuffix is the file extension for public key files.
StrictHostChecksAsk will cause openssh to ask the user about hosts that don't appear in known_hosts file.
StrictHostChecksDefault configures the default, implementation-specific, behaviour.
StrictHostChecksNo disables strict host key checking.
StrictHostChecksYes enabled strict host key checking enabled.

# Variables

Cancelled is an error indicating that a command timed out.
DefaultClient is the default SSH client for the process.
No description provided by the author
No description provided by the author
KeyBits is used to determine the number of bits to use for the RSA keys created using the GenerateKey function.

# Structs

No description provided by the author
Cmd represents a command to be (or being) executed on a remote host.
ExecParams are used for the parameters for ExecuteCommandOnMachine.
GoCryptoClient is an implementation of Client that uses the embedded go.crypto/ssh SSH client.
OpenSSHClient is an implementation of Client that uses the ssh and scp executables found in $PATH.
Options is a client-implementation independent SSH options set.
RunningCmd represents a command that has been started.

# Interfaces

Client is an interface for SSH clients to implement.

# Type aliases

No description provided by the author
StrictHostChecksOption defines the possible values taken by Option.SetStrictHostKeyChecking().