Coder Social home page Coder Social logo

parallel-ssh's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

parallel-ssh's Issues

pssh --help的主机相关提示还是旧的~

 pssh --help
Usage: pssh [OPTIONS] -h hosts.txt command [...]

Options:
  --version             show program's version number and exit
  --help                show this help message and exit
  -h HOST_FILE, --hosts=HOST_FILE
                        hosts file (each line "[user@]host[:port]")
  -H HOST_STRING, --host=HOST_STRING
                        additional host entries ("[user@]host[:port]")

主机格式还是旧的,应该是:

    1. host[:port] [login[:passwd]]
    2. [user[:passwd]@]host[:port]

prsyc error when using -O option

it shows
UnboundLocalError: local variable 'ssh' referenced before assignment

i check the source code and the reson is you commented ssh = ['ssh'] in line 72, and when passwd == None,this variable will not be assigned. then it died when i use -O option.

    # ssh = ['ssh']
    if passwd == None:
        ssh = ['ssh']
        # sys.stderr.write('using standard ssh method\n')
    else:
        cmd = ['sshpass', '-p', passwd, 'ssh']
        # sys.stderr.write('using sshpass method\n')

    if opts.options:
        for opt in opts.options:
            ssh += ['-o', opt]
    if port:
        ssh += ['-p', port]
    if opts.ssh_args:
        ssh += [opts.ssh_args]

    cmd = ['rsync', '-e', ' '.join(ssh)]

i modified code like below, problem resolved.
ssh = ['ssh']

    if opts.options:
        for opt in opts.options:
            ssh += ['-o', opt]
    if port:
        ssh += ['-p', port]
    if opts.ssh_args:
        ssh += [opts.ssh_args]

    if passwd == None:
        cmd = ['rsync', '-e', ' '.join(ssh)]
        # sys.stderr.write('using standard ssh method\n')
    else:
        cmd = ['sshpass', '-p', passwd, 'rsync', '-e', ' '.join(ssh)]
        # sys.stderr.write('using sshpass method\n')

希望能内置expect功能~

当本机第一次pssh远程主机时会失败,因为第一次ssh会出现如下选择:

Are you sure you want to continue connecting (yes/no)? yes

shell下可以用expect来处理,而python下有pexpect,希望pssh能内置此功能~

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.