Utility functions

Package containing static utility functions for parallel-ssh module.

pssh.utils.enable_host_logger()

Enable host logger for logging stdout from remote commands as it becomes available.

pssh.utils.enable_logger(_logger, level=20)

Enables logging to stdout for given logger

pssh.utils.load_private_key(_pkey)

Load private key from pkey file object or filename

Parameters:pkey (file/str) – File object or file name containing private key
pssh.utils.read_openssh_config(_host, config_file=None)

Parses user’s OpenSSH config for per hostname configuration for hostname, user, port and private key values

Parameters:_host – Hostname to lookup in config