get_ssh_connection¶
- atomate2.utils.file_client.get_ssh_connection(username, hostname, key_filename, config_filename=None)[source]¶
Connect to a remote host via paramiko.
If the host key is not present it will be added automatically.
- Parameters:
username (str or None) – The username. If
None
, the current logged in username will be used.hostname (str) – The host name. Supports host aliases defined in the ssh config file.
key_filename (str or Path) – Path to private key file.
config_filename (str or Path or None) – Path to OpenSSH config file.
- Returns:
An ssh connection to the host.
- Return type:
.SSHClient