# SSH Pass Authentication Error: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).", "unreachable": true

**URL:** <https://forum.ansible.com/t/ssh-pass-authentication-error-permission-denied-publickey-gssapi-keyex-gssapi-with-mic-password-unreachable-true/40116>\
**Category:** Get Help\
**Tags:** ssh, github\
**Created:** [February 7, 2025, 5:30am UTC](https://forum.ansible.com/t/ssh-pass-authentication-error-permission-denied-publickey-gssapi-keyex-gssapi-with-mic-password-unreachable-true/40116 "2025-02-07T05:30:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Courtney\_Poles](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/courtney_poles/32/7518_2.png) [@Courtney\_Poles](https://forum.ansible.com/u/Courtney_Poles)\
**Post date:** [February 7, 2025, 5:30am UTC](https://forum.ansible.com/t/ssh-pass-authentication-error-permission-denied-publickey-gssapi-keyex-gssapi-with-mic-password-unreachable-true/40116/1 "2025-02-07T05:30:18Z")

</div>

I am trying to use SSH pass to authenticate and then run a playbook via GitHub Actions (GHA) and am encountering the following error:

```auto
encountered an authentication error fatal: [airflowdev]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '10.1X.29.7X' (ED25519) to the list of known hosts.\r\n\n USE OF THIS COMPUTING SYSTEM IS RESTRICTED TO THE CONDUCT OF COMPANY\n BUSINESS BY AUTHORIZED USERS. ALL INFORMATION AND COMMUNICATIONS ON THIS\n SYSTEM ARE SUBJECT TO REVIEW, MONITORING, AND RECORDING AT ANY TIME\n WITHOUT NOTICE. UNAUTHORIZED ACCESS OR USE MAY BE SUBJECT TO PROSECUTION.\n\ninfogrid@10.1X.29.7X: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).", "unreachable": true}

```

The GHA Workflow

```auto
name: ansiblePOC

on:
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:
env:
  ANSIBLE_PASSWORD: ${{ secrets.ANSIBLE_AIRFLOW_DEV }}  
jobs:
  deploy_dags:
    runs-on: [self-hosted, linux]
    container:
      image: ansible-poc:latest
      credentials:
        username: ${{ secrets.ARTIFACTORY_USER }}
        password: ${{ secrets.ARTIFACTORY_PAT }}
      env:
        ANSIBLE_PASSWORD: ${{ env.ANSIBLE_PASSWORD }}
        ANSIBLE_REMOTE_USER: infogrid
        ANSIBLE_HOST_KEY_CHECKING: False
        ANSIBLE_DEBUG: true
      volumes:
         - ./ansisble/fake_dags:/fake_dags
         - ./ansisble/inventory:/inventory
         - ./ansisble/playbooks:/playbooks
    steps:
      - name: Pulling files from repository to GitHub runner
        uses: actions/checkout@v4

      - name: Deploy DAGs
        run: ansible-playbook -i ./ansible/inventory/hosts.yml ./ansible/playbooks/fakedagdeploy.yml

```

The Inventory File

```auto
airflowservers:
  hosts:
    airflowdev:
      ansible_host: 10.1X.29.7X

```

The Playbook

```auto
- name: fakedagdeployment
  hosts: airflowdev
  become: true
  tasks:
    - name: deploy fake dags
      ansible.posix.synchronize:
        src: /fake_dags
        dest: /home/infogrid/cp_test_ansible
        delete: true
        recursive: true

```

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![it-pappa](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/it-pappa/32/7523_2.png) [@it-pappa](https://forum.ansible.com/u/it-pappa)\
**Post date:** [February 7, 2025, 10:57am UTC](https://forum.ansible.com/t/ssh-pass-authentication-error-permission-denied-publickey-gssapi-keyex-gssapi-with-mic-password-unreachable-true/40116/2 "2025-02-07T10:57:51Z")

</div>

Are you trying to run a job with git runner on the ansible-host that will connect to the ansible-host with ansible?

Since IP is masked, if you want to run the job locally (i only know gitlab runner), you should change the inventory to localhost and ansible\_connection=local. Then it will not try to connect to itself with ssh.

If you are trying to run a playbook from one server to another server with ansible, i would move the all the credentials to groups\_vars or host\_vars and encrypt it with vault.

Or store the password in a git variable in you git (this works with gitlab) and run the command with --ask-become-pass and have that variable to be prompted after (if that works),
