ansible.builtin.paramiko_ssh connection – Run tasks via Python SSH (paramiko)
Note
This connection plugin is part of ansible-core
and included in all Ansible
installations. In most cases, you can use the short
plugin name
paramiko_ssh
.
However, we recommend you use the Fully Qualified Collection Name (FQCN) ansible.builtin.paramiko_ssh
for easy linking to the
plugin documentation and to avoid conflicting with other collections that may have
the same connection plugin name.
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 |
Comments |
---|---|
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. Default: Configuration:
|
|
Automatically add host keys Choices:
Configuration:
|
|
Set this to “False” if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host Choices:
Configuration:
|
|
False to disable searching for private key files in ~/.ssh/ Choices:
Configuration:
|
|
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 Configuration:
|
|
Remote port to connect to. Default: Configuration:
|
|
Path to private key file to use for authentication. Configuration:
|
|
Proxy information for running the connection via a jumphost Also this plugin will scan ‘ssh_args’, ‘ssh_extra_args’ and ‘ssh_common_args’ from the ‘ssh’ plugin settings for proxy information if set. Default: Configuration:
|
|
SUDO usually requires a PTY, True to give a PTY and False to not give a PTY. Choices:
Configuration:
|
|
Save the host keys to a file Choices:
Configuration:
|
|
Address of the remote target Default: Configuration:
|
|
User to login/authenticate as Can be set from the CLI via the Configuration:
|
|
Only used in parsing ProxyCommand for use in this plugin. Default: Configuration:
|
|
Only used in parsing ProxyCommand for use in this plugin. Default: Configuration:
|
|
Only used in parsing ProxyCommand for use in this plugin. Default: Configuration:
|
|
Number of seconds until the plugin gives up on failing to establish a TCP connection. Default: Configuration:
|
|
Toggles the use of persistence for connections Choices:
Configuration:
|
|
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 Choices:
Configuration:
|