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

Comments

host_key_auto_add

boolean

TODO: write it

Choices:

  • no

  • yes

Configuration:

  • INI entry:

    [paramiko_connection]
    host_key_auto_add = None
    
  • Environment variable: ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD

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:

  • no

  • yes ← (default)

Configuration:

  • INI entries:

    [defaults]
    host_key_checking = yes
    
    [paramiko_connection]
    host_key_checking = yes
    

    added in 2.5 of ansible.builtin

  • Environment variable: ANSIBLE_HOST_KEY_CHECKING

  • Environment variable: ANSIBLE_SSH_HOST_KEY_CHECKING

    added in 2.5 of ansible.builtin

  • Environment variable: ANSIBLE_PARAMIKO_HOST_KEY_CHECKING

    added in 2.5 of ansible.builtin

  • Variable: ansible_host_key_checking

    added in 2.5 of ansible.builtin

  • Variable: ansible_ssh_host_key_checking

    added in 2.5 of ansible.builtin

  • Variable: ansible_paramiko_host_key_checking

    added in 2.5 of ansible.builtin

look_for_keys

boolean

TODO: write it

Choices:

  • no

  • yes ← (default)

Configuration:

  • INI entry:

    [paramiko_connection]
    look_for_keys = yes
    
  • Environment variable: 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 --ask-pass option.

Configuration:

  • Variable: ansible_password

  • Variable: ansible_ssh_pass

  • Variable: ansible_ssh_password

  • Variable: ansible_paramiko_pass

  • Variable: ansible_paramiko_password

    added in 2.5 of ansible.builtin

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:

  • INI entry:

    [paramiko_connection]
    proxy_command =
    
  • Environment variable: ANSIBLE_PARAMIKO_PROXY_COMMAND

pty

boolean

TODO: write it

Choices:

  • no

  • yes ← (default)

Configuration:

  • INI entry:

    [paramiko_connection]
    pty = yes
    
  • Environment variable: ANSIBLE_PARAMIKO_PTY

record_host_keys

boolean

TODO: write it

Choices:

  • no

  • yes ← (default)

Configuration:

  • INI entry:

    [paramiko_connection]
    record_host_keys = yes
    
  • Environment variable: ANSIBLE_PARAMIKO_RECORD_HOST_KEYS

remote_addr

string

Address of the remote target

Default: “inventory_hostname”

Configuration:

  • Variable: ansible_host

  • Variable: ansible_ssh_host

  • Variable: ansible_paramiko_host

remote_user

string

User to login/authenticate as

Can be set from the CLI via the --user or -u options.

Configuration:

  • INI entries:

    [defaults]
    remote_user = None
    
    [paramiko_connection]
    remote_user = None
    

    added in 2.5 of ansible.builtin

  • Environment variable: ANSIBLE_REMOTE_USER

  • Environment variable: ANSIBLE_PARAMIKO_REMOTE_USER

    added in 2.5 of ansible.builtin

  • Variable: ansible_user

  • Variable: ansible_ssh_user

  • Variable: ansible_paramiko_user

use_persistent_connections

boolean

Toggles the use of persistence for connections

Choices:

  • no ← (default)

  • yes

Configuration:

  • INI entry:

    [defaults]
    use_persistent_connections = no
    
  • Environment variable: ANSIBLE_USE_PERSISTENT_CONNECTIONS

Authors

  • Ansible Core Team