On this page
ansible.builtin.paramiko_ssh – 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
even without specifying the collections:
keyword. However, we recommend you use the FQCN for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same connection plugin name.
New in version 0.1: of ansible.builtin
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 | Choices/Defaults | Configuration | Comments |
---|---|---|---|
host_key_auto_add
boolean
|
|
ini entries:
[paramiko_connection]
env:ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD
|
TODO: write it
|
host_key_checking
boolean
|
|
ini entries:
[defaults] [paramiko_connection]
added in 2.5 of ansible.builtin
env:ANSIBLE_HOST_KEY_CHECKING
env:ANSIBLE_SSH_HOST_KEY_CHECKING
added in 2.5 of ansible.builtin
env:ANSIBLE_PARAMIKO_HOST_KEY_CHECKING
added in 2.5 of ansible.builtin
var: ansible_host_key_checking
added in 2.5 of ansible.builtin
var: ansible_ssh_host_key_checking
added in 2.5 of ansible.builtin
var: ansible_paramiko_host_key_checking
added in 2.5 of ansible.builtin
|
Set this to "False" if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host
|
look_for_keys
boolean
|
|
ini entries:
[paramiko_connection]
env:ANSIBLE_PARAMIKO_LOOK_FOR_KEYS
|
TODO: write it
|
password
string
|
var: ansible_password
var: ansible_ssh_pass
var: ansible_ssh_password
var: ansible_paramiko_pass
var: ansible_paramiko_password
added in 2.5 of ansible.builtin
|
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 --ask-pass option.
|
|
proxy_command
string
|
Default:
""
|
ini entries:
[paramiko_connection]
env:ANSIBLE_PARAMIKO_PROXY_COMMAND
|
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.
|
pty
boolean
|
|
ini entries:
[paramiko_connection]
env:ANSIBLE_PARAMIKO_PTY
|
TODO: write it
|
record_host_keys
boolean
|
|
ini entries:
[paramiko_connection]
env:ANSIBLE_PARAMIKO_RECORD_HOST_KEYS
|
TODO: write it
|
remote_addr
string
|
Default:
"inventory_hostname"
|
var: ansible_host
var: ansible_ssh_host
var: ansible_paramiko_host
|
Address of the remote target
|
remote_user
string
|
ini entries:
[defaults] [paramiko_connection]
added in 2.5 of ansible.builtin
env:ANSIBLE_REMOTE_USER
env:ANSIBLE_PARAMIKO_REMOTE_USER
added in 2.5 of ansible.builtin
var: ansible_user
var: ansible_ssh_user
var: ansible_paramiko_user
|
User to login/authenticate as
Can be set from the CLI via the --user or -u options.
|
|
use_persistent_connections
boolean
|
|
ini entries:
[defaults]
env:ANSIBLE_USE_PERSISTENT_CONNECTIONS
|
Toggles the use of persistence for connections
|
Authors
- Ansible Core Team
© 2012–2018 Michael DeHaan
© 2018–2021 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