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 |
---|---|
banner_timeout float added in ansible-core 2.14 | 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:
|
host_key_auto_add boolean | Automatically add host keys Choices:
Configuration:
|
host_key_checking boolean | 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:
|
look_for_keys boolean | False to disable searching for private key files in ~/.ssh/ Choices:
Configuration:
|
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 Configuration:
|
port integer | Remote port to connect to. Default: Configuration:
|
private_key_file string | Path to private key file to use for authentication. Configuration:
|
proxy_command string | 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:
|
pty boolean | SUDO usually requires a PTY, True to give a PTY and False to not give a PTY. Choices:
Configuration:
|
record_host_keys boolean | Save the host keys to a file Choices:
Configuration:
|
remote_addr string | Address of the remote target Default: Configuration:
|
remote_user string | User to login/authenticate as Can be set from the CLI via the Configuration:
|
ssh_args string Removed in: version 2.18 Why: In favor of the “proxy_command” option. Alternative: proxy_command | Only used in parsing ProxyCommand for use in this plugin. Default: Configuration:
|
ssh_common_args string Removed in: version 2.18 Why: In favor of the “proxy_command” option. Alternative: proxy_command | Only used in parsing ProxyCommand for use in this plugin. Default: Configuration:
|
ssh_extra_args string Removed in: version 2.18 Why: In favor of the “proxy_command” option. Alternative: proxy_command | Only used in parsing ProxyCommand for use in this plugin. Default: Configuration:
|
timeout integer | Number of seconds until the plugin gives up on failing to establish a TCP connection. Default: Configuration:
|
use_persistent_connections boolean | Toggles the use of persistence for connections Choices:
Configuration:
|
use_rsa_sha2_algorithms boolean added in ansible-core 2.14 | 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:
|
Collection links
© 2012–2018 Michael DeHaan
© 2018–2024 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/paramiko_ssh_connection.html