Skip to content

Ansible Connection

Supported Methods

SSM currently supports two connection methods:

  • Paramiko (default)
  • SSH (OpenSSH)

By default, SSM uses Paramiko to support various underlying connection configurations (passwords, key, key + passphrase).

If you experience connection issues, try using the SSH (OpenSSH) option in the Configuration modal of your device in the Inventory (Show advanced must be on).

FeatureClassic SSH (OpenSSH)Paramiko (default)
ImplementationNative SSH client (OpenSSH)Pure Python library
PerformanceGenerally fasterTypically slower due to Python
CompatibilityWidely available on Unix-like systemsUseful where OpenSSH is not available
SecurityHigh, relies on OpenSSH security practicesSecure, but Python implementation may lag behind OpenSSH updates
Fallback/AlternativeDefault methodAlternative method
DependenciesRequires OpenSSHPure Python, no extra native dependencies
FeaturesFull OpenSSH feature supportLimited compared to OpenSSH
Use CaseStandard and preferred for most environmentsSpecific scenarios where OpenSSH is not feasible

Limitations of SSH (OpenSSH)

The SSH (OpenSSH) does NOT support using an SSH key with a passphrase.

Changing the connection method

Inventory/<device>/Configuration => "SSH" tab ; Show advanced on;

connection-method

Ansible Become (aka sudo)

The become method in Ansible is used to escalate privileges and run tasks with higher permissions than that of the current user. This is particularly useful for performing administrative tasks that require superuser or other privilege elevation on remote machines.

become allows users to achieve this escalation in a controlled and secure manner, using mechanisms like sudo, su, pbrun, and others.

The configuration for the sudo user credentials must be specified in the Device configuration.

Become

To install the SSM agent, configuring a become method is mandatory.

SSM supports the following methods:

  • sudo (default): Default method, commonly used to run commands as the superuser or another user with sudo privileges.
  • su: Switches user to execute tasks with the privileges of another user.
  • pbrun: A method used in environments where pbrun is available, often in certain enterprise systems.
  • pfexec: Primarily used on Solaris systems.
  • doas: Relevant for OpenBSD systems.
  • ksu: Used with Kerberos-based systems.
  • dzdo: Used in environments where Centrify's Direct Authorize is available.

Changing the connection method

Inventory/<device>/Configuration => "SSH" tab ; Show advanced on;

become-method

Made with love