[Bug 1997] Add QoS to ControlPath escapes

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri May 29 20:56:56 AEST 2020


https://bugzilla.mindrot.org/show_bug.cgi?id=1997

--- Comment #4 from Peter Lebbing <peter at digitalbrains.com> ---
(In reply to chrysn from comment #3)

Sorry for not replying sooner, it slipped my mind!

> Would a patch to add a "%I" for "1 for interactive sessions, 0
> otherwise" to the expansion be generally acceptable? Peter, would it
> still serve your purposes (given your description sounded like the
> added flexibility is more of a bonus than a requirement)?

Yes, that sounds fine! It would serve my purposes well. My personal
preference would go not to 1/0 but something like I/NI for
Interactive/Non-Interactive or something like that. But that's just a
minor matter of preference. 1/0 works fine as well.

> If so, I'd be happy to write it.

That would be great!

> Would it make sense to make the condition `options.forward_x11 ||
> tty_flag` rather than plain `tty_flag` to capture the intention of
> the forwarding?

I think I agree that it's better not to do this. Especially the case of
a globally enabled ForwardX11 is worrying to me.

FWIW, I came up with a workaround to get my priorities straight ;-).
The case where I want to have concurrent interactive and bulk
connections is almost always with rsync. So I have this:

~/.ssh/config:
--8<---------------cut here---------------start------------->8---
Host *
ControlMaster auto
ControlPath /home/peter/.ssh/control-%r@%h:%p
--8<---------------cut here---------------end--------------->8---

~/.profile:
--8<---------------cut here---------------start------------->8---
export RSYNC_RSH="ssh -o
ControlPath=/home/peter/.ssh/rsync-control-%r@%h:%p"
--8<---------------cut here---------------end--------------->8---

This has an interesting side-effect: rsync auto-completion in bash uses
the interactive ControlMaster! Which is fine, since auto-completion
/is/ interactive. It turns out the completion actually uses ssh and ls
to do its work, not rsync, and auto-completion of remote paths is
turned off if rsync has an -e/-rsh argument. I am certainly not going
to tell them to check RSYNC_RSH as well! :-)

With an open interactive ControlMaster, auto-completion is much
quicker.

Thanks,

Peter.

-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list