ansible.netcommon.libssh connection – Run tasks using libssh for ssh connection
Note
This connection plugin is part of the ansible.netcommon collection (version 6.1.3).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install ansible.netcommon
.
To use it in a playbook, specify: ansible.netcommon.libssh
.
New in ansible.netcommon 1.1.0
Synopsis
- Use the ansible-pylibssh python bindings to connect to targets
- The python bindings use libssh C library (https://www.libssh.org/) to connect to targets
- This plugin borrows a lot of settings from the ssh plugin as they both cover the same protocol.
Parameters
Parameter | Comments |
---|---|
config_file path added in ansible.netcommon 5.1.0 | Alternate SSH config file location Configuration:
|
host_key_auto_add boolean | TODO: write it 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 | TODO: write it 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:
|
password_prompt string added in ansible.netcommon 3.1.0 | Text to match when using keyboard-interactive authentication to determine if the prompt is for the password. Requires ansible-pylibssh version >= 1.0.0 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 | TODO: write it 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 added in ansible.netcommon 3.2.0 | Arguments to pass to all ssh CLI tools. ProxyCommand is the only supported argument. This option is deprecated in favor of proxy_command and will be removed in a release after 2026-01-01. Configuration:
|
ssh_common_args string added in ansible.netcommon 3.2.0 | Common extra arguments for all ssh CLI tools. ProxyCommand is the only supported argument. This option is deprecated in favor of proxy_command and will be removed in a release after 2026-01-01. Configuration:
|
ssh_extra_args string added in ansible.netcommon 3.2.0 | Extra arguments exclusive to the ‘ssh’ CLI tool. ProxyCommand is the only supported argument. This option is deprecated in favor of proxy_command and will be removed in a release after 2026-01-01. Configuration:
|
use_persistent_connections boolean | Toggles the use of persistence for connections 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/netcommon/libssh_connection.html