Giter Club home page Giter Club logo

Comments (3)

jeffpeiyt avatar jeffpeiyt commented on May 27, 2024

Hi @sizeoftank

thanks for your interests in Parallec. Do you mean using proxy in ssh such as this example?

session.setProxy(new ProxyHTTP(proxy_host, proxy_port));

If yes, then it should not be hard by passing a set of parameters, would be super nice if you can fork and make a contribution similar to this pull request.

from parallec.

sizeoftank avatar sizeoftank commented on May 27, 2024

Hi, thanks for your response.
I think it is a bit difference between HTTP proxy
think about we want to execute df -h on target host 172.16.16.50 through a jump host 172.16.16.10 , a simple way is execute ssh 172.16.16.50 "df -h" on host 172.16.16.10 like that in parallec:

        pc.prepareSsh().setConcurrency(500)
                .setTargetHostsFromString("172.16.16.10")
                .setSshCommandLine("ssh 172.16.16.50 \"df -h; ds;\" ").setSshUserName(userName)
                .setSshPassword(passwd).setSshConnectionTimeoutMillis(5000)

And using ProxyComand is another way to this
It is just a configuration of ssh client ( like our setSshConnectionTimeoutMillis ), and if I using paramiko or ansible (python libraries) , they supported these.

So I suppose that we need to implement these configurations

        pc.prepareSsh().setConcurrency(500)
                .setTargetHostsFromString("172.16.16.50")
                .setSshCommandLine("df -h; ds; ").setSshUserName(userName)
                .setSshPassword(passwd).setSshConnectionTimeoutMillis(5000)
                .setProxyCommand("ssh [email protected] -p 22 nc %h %p")
                .setIdentityFileForProxyCommand("keyfile")

I will fork your repository to do some trial :-)

from parallec.

jeffpeiyt avatar jeffpeiyt commented on May 27, 2024

@sizeoftank

Thanks for your clarification. If you are using jump host, probably could follow this example to enhance it.

As parallec uses Jsch, the features supported by Jsch would be easy to support by adding those parameters.

from parallec.

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.