Open Zenexer opened 6 years ago
Temporary workaround exclusively for rsync:
Put the following in /usr/local/bin/sga-ssh-rsync
:
#!/bin/sh
host="$1"
shift
sga-ssh "$host" -- "$@"
Then run:
sudo chmod +x /usr/local/bin/sga-ssh-rsync
sed 's#RSYNC_RSH=sga-ssh$#RSYNC_RSH=/usr/local/bin/sga-ssh-rsync#' /usr/local/bin/sga-env.sh | sudo tee /usr/local/bin/sga-env.sh > /dev/null
I'm not using the -i
flag for sed so that it'll work with non-GNU seds, such as on macOS.
I believe I have the same issue. Trying to run rsync ...
I get
Unknown option: server
Unknown option: e.Lsfx
then a hang on Linux Mint 19. On Ubuntu 16.04.6, I get the popup for allowing the agent use, but then it fails with
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(176) [sender=3.1.1]
My local machine is running macOS and all are using a zsh shell. I get the same result as @Zenexer with the echo --version
test.
@Zenexer's workaround also worked for me (thank you!)
Don't forget to source the file after changing it.
source /usr/local/bin/sga-env.sh
sga-ssh's command line argument processing isn't quite compatible with ssh's, and this breaks rsync.
Take, for example:
This will result in an invocation of sga-ssh similar to the following:
sga-ssh attempts to interpret the --server and -e arguments as arguments to itself, rather than part of the command to be executed on the target.
There's a pretty easy test to confirm this: