Utility functions

Module containing static utility functions for parallel-ssh.


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


Load private key from pkey file object or filename.

For Paramiko based clients only.

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