Skip to content

paramiko_ssh

Collection Note

This module is part of the ansible.builtin collection. To install the collection, use:

ansible-galaxy collection install ansible.builtin
Added in version 0.1.

Synopsis

  • Use the Python SSH implementation (Paramiko) to connect to targets
  • The paramiko transport is provided because many distributions, in particular EL6 and before do not support ControlPersist in their SSH implementations.
  • This is needed on the Ansible control machine to be reasonably efficient with connections. Thus paramiko is faster for most users on these platforms. Users with ControlPersist capability can consider using -c ssh or configuring the transport in the configuration file.
  • This plugin also borrows a lot of settings from the ssh plugin as they both cover the same protocol.

Parameters

Parameter Defaults / Choices Comments
banner_timeout
float
Default: 30
Configures, in seconds, the amount of time to wait for the SSH banner to be presented. This option is supported by paramiko version 1.15.0 or newer.
Env: ANSIBLE_PARAMIKO_BANNER_TIMEOUT
Version Added: 2.14
host_key_auto_add
boolean
Automatically add host keys
Env: ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD
host_key_checking
boolean
Default: True
Set this to "False" if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host
Env: ANSIBLE_HOST_KEY_CHECKING
Env: ANSIBLE_SSH_HOST_KEY_CHECKING
Env: ANSIBLE_PARAMIKO_HOST_KEY_CHECKING
look_for_keys
boolean
Default: True
False to disable searching for private key files in ~/.ssh/
Env: ANSIBLE_PARAMIKO_LOOK_FOR_KEYS
password
string
Secret used to either login the ssh server or as a passphrase for ssh keys that require it
Can be set from the CLI via the C(--ask-pass) option.
port
int
Default: 22
Remote port to connect to.
Env: ANSIBLE_REMOTE_PORT
Env: ANSIBLE_REMOTE_PARAMIKO_PORT
private_key_file
string
Path to private key file to use for authentication.
Env: ANSIBLE_PRIVATE_KEY_FILE
Env: ANSIBLE_PARAMIKO_PRIVATE_KEY_FILE
proxy_command
string
Proxy information for running the connection via a jumphost.
Env: ANSIBLE_PARAMIKO_PROXY_COMMAND
pty
boolean
Default: True
SUDO usually requires a PTY, True to give a PTY and False to not give a PTY.
Env: ANSIBLE_PARAMIKO_PTY
record_host_keys
boolean
Default: True
Save the host keys to a file
Env: ANSIBLE_PARAMIKO_RECORD_HOST_KEYS
remote_addr
string
Default: inventory_hostname
Address of the remote target
remote_user
string
User to login/authenticate as
Can be set from the CLI via the C(--user) or C(-u) options.
Env: ANSIBLE_REMOTE_USER
Env: ANSIBLE_PARAMIKO_REMOTE_USER
timeout
int
Default: 10
Number of seconds until the plugin gives up on failing to establish a TCP connection.
Env: ANSIBLE_TIMEOUT
Env: ANSIBLE_SSH_TIMEOUT
Env: ANSIBLE_PARAMIKO_TIMEOUT
use_persistent_connections
boolean
Toggles the use of persistence for connections
Env: ANSIBLE_USE_PERSISTENT_CONNECTIONS
use_rsa_sha2_algorithms
boolean
Default: True
Whether or not to enable RSA SHA2 algorithms for pubkeys and hostkeys
On paramiko versions older than 2.9, this only affects hostkeys
For behavior matching paramiko<2.9 set this to V(False)
Env: ANSIBLE_PARAMIKO_USE_RSA_SHA2_ALGORITHMS
Version Added: 2.14

Authors

  • Ansible Core Team