---
title: Setting up authentication using a password
description: Ensure that:
component: pingintelligence
version: 5.2
page_id: pingintelligence:installing_pingintelligence_for_apis:pingintelligence_setting_up_authentication_with_password
canonical_url: https://docs.pingidentity.com/pingintelligence/5.2/installing_pingintelligence_for_apis/pingintelligence_setting_up_authentication_with_password.html
revdate: April 3, 2024
section_ids:
  before-you-begin: Before you begin
  about-this-task: About this task
  steps: Steps
---

# Setting up authentication using a password

## Before you begin

Ensure that:

* You've installed `sshpass` module on the management host machine.

  |   |                                                    |
  | - | -------------------------------------------------- |
  |   | The management host machine is a RHEL 7.6 machine. |

* The password that you configure for the user in the `hosts` file must already be configured on the host machines.

## About this task

You can also use password to authenticate with PingIntelligence and MongoDB host machines.

Configure the password of the host machine in the `hosts` file.

## Steps

* To add the password in the `hosts` file, edit the `hosts` file to configure the password in `ansible_ssh_pass` parameter as shown in bold in the following `hosts` file snippet

  ```
  # Ansible SSH user to access host machines
  ansible_ssh_user=ec2-user
  # Uncomment the ansible_ssh_pass line and configure password of ansible_ssh_user if you want to use SSH connection with password.
  # If you do not use this option, then the SSH user uses password-less authentication.
  #ansible_ssh_pass=<SSH_user_password>
  ```
