W3cubDocs

/Ansible 2.9

paramiko_ssh – Run tasks via python ssh (paramiko)

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]
host_key_auto_add = VALUE

env:ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD
TODO: write it
host_key_checking
boolean
Default:
"yes"
ini entries:

[defaults]
host_key_checking = yes

[paramiko_connection]
host_key_checking = yes

env:ANSIBLE_HOST_KEY_CHECKING
env:ANSIBLE_SSH_HOST_KEY_CHECKING
env:ANSIBLE_PARAMIKO_HOST_KEY_CHECKING
var: ansible_host_key_checking
var: ansible_ssh_host_key_checking
var: ansible_paramiko_host_key_checking
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
Default:
"yes"
ini entries:

[paramiko_connection]
look_for_keys = yes

env:ANSIBLE_PARAMIKO_LOOK_FOR_KEYS
TODO: write it
password
-
var: ansible_password
var: ansible_ssh_pass
var: ansible_ssh_password
var: ansible_paramiko_pass
var: ansible_paramiko_password
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
-
Default:
""
ini entries:

[paramiko_connection]
proxy_command =

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
Default:
"yes"
ini entries:

[paramiko_connection]
pty = yes

env:ANSIBLE_PARAMIKO_PTY
TODO: write it
record_host_keys
boolean
Default:
"yes"
ini entries:

[paramiko_connection]
record_host_keys = yes

env:ANSIBLE_PARAMIKO_RECORD_HOST_KEYS
TODO: write it
remote_addr
-
Default:
"inventory_hostname"
var: ansible_host
var: ansible_ssh_host
var: ansible_paramiko_host
Address of the remote target
remote_user
-
ini entries:

[defaults]
remote_user = VALUE

[paramiko_connection]
remote_user = VALUE

env:ANSIBLE_REMOTE_USER
env:ANSIBLE_PARAMIKO_REMOTE_USER
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
Default:
"no"
ini entries:

[defaults]
use_persistent_connections = no

env:ANSIBLE_USE_PERSISTENT_CONNECTIONS
Toggles the use of persistence for connections

Status

Authors

  • Ansible Core Team

Hint

If you notice any issues in this documentation, you can edit this document to improve it.

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/plugins/connection/paramiko_ssh.html