Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bsync over ssh doesn't use existing 'ControlPath' #14

Open
senorsmile opened this issue Aug 5, 2014 · 7 comments
Open

bsync over ssh doesn't use existing 'ControlPath' #14

senorsmile opened this issue Aug 5, 2014 · 7 comments
Labels

Comments

@senorsmile
Copy link

E.g. I have a ~/.ssh/config set up so:

ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
ControlPersist 1h
ForwardAgent yes

Host rs
Hostname remoteserverip
User myusername

It does use the host shortcut I set up, but it doesn't respect/utilize the control persist I am using. This should use the existing connection instead of creating a new one and requesting my password every time.

@dooblem
Copy link
Owner

dooblem commented Aug 8, 2014

Hi,
Bsync uses it's own persistent socket internally, that's probably why it conflicts with your own socket.

Maybe we should add flag to disable it. I will take a look at it when I have time.

@dooblem
Copy link
Owner

dooblem commented Aug 10, 2014

Is it possible for you to use an ssh key for authenticating? With an ssh key the password prompt is not a problem anymore.

Otherwise the only solution I see it too add a flag, say, -m, to disable bsync internal controlmaster connexion.
I don't see any way of detecting that automatically, I mean in a simple and reliable way.

What do you think?

@senorsmile
Copy link
Author

It would be great if this were configurable. For example, the ansible project allows you to override the default ssh_args in a .conf file. Either that or a simple command line flag would definitely suffice.

@senorsmile senorsmile reopened this Nov 3, 2014
@dooblem
Copy link
Owner

dooblem commented Feb 18, 2016

There is now a -o option to add custom ssh options. We may also add an option to disable controlmaster ssh optimisation.

@senorsmile
Copy link
Author

Fantastic! I should be able to test this shortly.

Are the changes in master or one of the branches?

@dooblem
Copy link
Owner

dooblem commented Feb 18, 2016

-o option is in master.

@ghost
Copy link

ghost commented Mar 7, 2016

couldn't detection be done like this:

$ ssh host -G | grep ^controlmaster
controlmaster false

vs.

$ ssh host -G | grep ^controlmaster
controlmaster auto

man ssh:
-G Causes ssh to print its configuration after evaluating Host and Match blocks and exit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants