Giter VIP home page Giter VIP logo

Comments (4)

martymac avatar martymac commented on May 26, 2024

Hello Youssef !

Fpsync starts ssh commands in the background through a non-interactive shell, thus stdin is redirected from /dev/null (at least on FreeBSD) and I don't know how sshpass can cope with that. The best way to connect passwordless is probably to use a ssh key (playing with a ssh_config(5) file) but if you want to try to hack around ssh calls, check the SSH_BIN variable (https://github.com/martymac/fpart/blob/master/tools/fpsync#L1104). You may want to initialize it with sshpass instead of ssh and add a SSH_OPTS variable. Something like :

SSH_BIN="$(command -v sshpass)"
SSH_OPTS="$(command -v ssh)"

and then add ${SSH_OPTS} to ${SSH_BIN} calls later in the code.

Tell me how it goes, those two variables could become new options to fpsync :)

from fpart.

yghorbal avatar yghorbal commented on May 26, 2024

Hello @martymac, thank you for the quick reply. Just to be clear about my use case, I'm not trying to use sshpass for Fpsync SSH workers. I'm trying to use it only for the SSH session of Rsync itself.
I'll mess around with the script and see how things goes, and report back.

from fpart.

yghorbal avatar yghorbal commented on May 26, 2024

@martymac I've managed to make it work as I wanted

  • create a simple shell script rsync.sh
#!/usr/bin/env bash
sshpass -e rsync "$@"
  • run fpsync like this:
SSHPASS=somepassword fpsync -n 4 -f 3 -T /path/to/rsync.sh src/ server:dst/

from fpart.

martymac avatar martymac commented on May 26, 2024

Wow, perfect ! And thanks for your feedback :)

Cheers,

Ganael.

from fpart.

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.