Giter Club home page Giter Club logo

Comments (4)

clincha avatar clincha commented on July 19, 2024

This doesn't look like you have an issue with this action, it looks like you have an issue with your SSH key configuration. In the code you shared you don't even call the action that @dawidd6 made.

If I were you I'd look into the keys you're using and the sshd configuration (/etc/ssh/sshd_config) on the host you're trying to connect to.

from action-ansible-playbook.

ticktockhouse avatar ticktockhouse commented on July 19, 2024

@clincha Thanks for your reply. You're right, I didn't share the whole of the github action- I've edited the gist to include this.

The other weird thing is, as you can see in the updated action, I do a manual ssh to the box in question and I can report that this works fine.

Here is more context around the error arisiing in Ansible:

<jumpbox_ip> ESTABLISH SSH CONNECTION FOR USER: None
<jumpbox_ip> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/runner/work/flawless-infra/flawless-infra/ansible/chubb/.ansible_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o UserKnownHostsFile=.ansible_known_hosts -J <server_ip> -o 'ControlPath="/home/runner/.ansible/cp/9a9d293357"' <jumpbox_ip> '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<jumpbox_ip> (255, b'', b'kex_exchange_identification: Connection closed by remote host\r\n')
fatal: [chubb-staging-web]: UNREACHABLE! => changed=false 
  msg: 'Failed to connect to the host via ssh: kex_exchange_identification: Connection closed by remote host'
  unreachable: true

from action-ansible-playbook.

clincha avatar clincha commented on July 19, 2024

Can you cut out everything except for the ansible step and check if that works? Also remove the known hosts stuff please (try to get the minimum working then build from there).

'IdentityFile="/home/runner/work/flawless-infra/flawless-infra/ansible/chubb/.ansible_key"'

It seems to be passing in the key correctly. Can you please post your ansible.cfg file or however you pass in your Ansible environment.

I still get the feeling that this isn't an issue with this action but an issue with the key or the server itself

from action-ansible-playbook.

dawidd6 avatar dawidd6 commented on July 19, 2024

No response. Closing.

from action-ansible-playbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.