Giter VIP home page Giter VIP logo

Comments (3)

henry2004y avatar henry2004y commented on July 25, 2024 2

Thanks for the tips!

Unfortunately the ssh-keyscan does not work for my case. However, I found a working one as follows:

- name: Reference data
      run: |
        ssh -o StrictHostKeyChecking=no username@server1
        ssh -o StrictHostKeyChecking=no -J username@server1 username@server2
        scp -o 'ProxyCommand ssh username@server1 -W %h:%p' username@server2:filename .
        cat filename

This is really tricky.

from ssh-agent.

mpdude avatar mpdude commented on July 25, 2024 1

I think this has nothing to do with this action.

My guess is that the worker node (where the GH Action is executed) does not know your host's server2 public host key to verify that server's identity.

You can use ssh-keyscan server2 to obtain that key.

At best, you gather that key, review/verify it and then make sure that your action writes/appends it to ~/.ssh/known_hosts before you run the scp command.

You could also use run ssh-keyscan server2 >> ~/.ssh/known_hosts directly in a run command in your workflow; but that would accept and trust any key that would be offered at the time the action runs – in other words, if would completely defeat the whole purpose of SSH host key checking in the first place.

from ssh-agent.

x-yuri avatar x-yuri commented on July 25, 2024 1

@henry2004y It's generally safer to not rely on ssh-keyscan (that equals to disabling host key verification in case of ci scripts). See a workaround here.

from ssh-agent.

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.