Mailing List Archive

Reminder: Add ssh_config equivalents of -N, -n and -f
Dear Damien,

Damien Miller wrote:
> On Fri, 26 Feb 2021, Volker Diels-Grabsch wrote:
> >
> > Is it still possible to include the ssh_config improvements which I
> > proposed last Sunday on this mailing list?
>
> No sorry, but I'll look at the right after release. We'll be doing
> another release in 2-3 months, so not long to wait.

Meanwhile, that version (8.6) was released as well.

Is there any chance to include this handy patch in the release thereafter (8.7)?

For your convenience: https://github.com/openssh/openssh-portable/pull/231


Best regards,
Volker

--
Volker Diels-Grabsch
----<<<((()))>>>----
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: Reminder: Add ssh_config equivalents of -N, -n and -f [ In reply to ]
On Tue, 4 May 2021, Volker Diels-Grabsch wrote:

> Dear Damien,
>
> Damien Miller wrote:
> > On Fri, 26 Feb 2021, Volker Diels-Grabsch wrote:
> > >
> > > Is it still possible to include the ssh_config improvements which I
> > > proposed last Sunday on this mailing list?
> >
> > No sorry, but I'll look at the right after release. We'll be doing
> > another release in 2-3 months, so not long to wait.
>
> Meanwhile, that version (8.6) was released as well.
>
> Is there any chance to include this handy patch in the release thereafter (8.7)?
>
> For your convenience: https://github.com/openssh/openssh-portable/pull/231

Sorry - have been very busy with the day job but will start catching up on
patch requests soon.

-d
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: Reminder: Add ssh_config equivalents of -N, -n and -f [ In reply to ]
Ping.

[. If there's anything I can do to reduce the barrier, such as posting
the pull request as patch files to the mailing list, or anything,
please let me know. ]

Best regards,
Volker

Damien Miller wrote:
> On Tue, 4 May 2021, Volker Diels-Grabsch wrote:
>
> > Dear Damien,
> >
> > Damien Miller wrote:
> > > On Fri, 26 Feb 2021, Volker Diels-Grabsch wrote:
> > > >
> > > > Is it still possible to include the ssh_config improvements which I
> > > > proposed last Sunday on this mailing list?
> > >
> > > No sorry, but I'll look at the right after release. We'll be doing
> > > another release in 2-3 months, so not long to wait.
> >
> > Meanwhile, that version (8.6) was released as well.
> >
> > Is there any chance to include this handy patch in the release thereafter (8.7)?
> >
> > For your convenience: https://github.com/openssh/openssh-portable/pull/231
>
> Sorry - have been very busy with the day job but will start catching up on
> patch requests soon.
>
> -d
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev@mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

--
Volker Diels-Grabsch
----<<<((()))>>>----
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: Reminder: Add ssh_config equivalents of -N, -n and -f [ In reply to ]
On Thu, 3 Jun 2021, Volker Diels-Grabsch wrote:

> Ping.
>
> [. If there's anything I can do to reduce the barrier, such as posting
> the pull request as patch files to the mailing list, or anything,
> please let me know. ]

Looking at these now.

I'm not sure about the naming of NoShell, because it's really about not
starting any kind of remote session. E.g. the existing -N talks about
not executing a remote command. Talking about shells I think runs the
risk that people will assume it somehow skips the remote shell for
command execution. They would probably find out soon enough that they
were wrong, but IMO it's better to avoid it altogether.

So the options are to rename the option to something like NoSession,
find a way to reuse the existing RemoteCommand option (though that is
IMO a little ugly) or perhaps introduce a new "SessionType" option
that can subsume functionality of both the -N (SessionType=none) and
-s (SessionType=subsystem) flags.

What do you think?

-d
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: Reminder: Add ssh_config equivalents of -N, -n and -f [ In reply to ]
Dear Damien,

Thanks for your response!

Damien Miller wrote:
> I'm not sure about the naming of NoShell, because it's really about not
> starting any kind of remote session.

I didn't really care about how to name this. All I did was noting
that the flag is stored in a C variable "no_shell", which I just
translated to camel case.

So I assume that we should rename that C variable as well?

> So the options are to rename the option to something like NoSession,
> find a way to reuse the existing RemoteCommand option (though that is
> IMO a little ugly) or perhaps introduce a new "SessionType" option
> that can subsume functionality of both the -N (SessionType=none) and
> -s (SessionType=subsystem) flags.
>
> What do you think?

I also don't think that reusing RemoteCommand is a good idea. This
would add unnecessary entaglement of mostly-unrelated options, and as
such increase the risk of accidentally introducing bugs.

I'd prefer to rename NoShell to NoSession, and perhaps to do the same
for the internal variable names for consistency. Then, we would have
a one-to-one match of command line and configuration file, which is
IMHO the least surprise for users already familiar with "-N" and "-s".

However, I'm not opposed to introduce "SessionType=none/subsystem", in
case you like me to implement it that way.

How should we proceed from here? Which variant should I implement?


Best regards,
Volker

--
Volker Diels-Grabsch
----<<<((()))>>>----
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: Reminder: Add ssh_config equivalents of -N, -n and -f [ In reply to ]
On Tue, 8 Jun 2021, Volker Diels-Grabsch wrote:

> I'd prefer to rename NoShell to NoSession, and perhaps to do the same
> for the internal variable names for consistency. Then, we would have
> a one-to-one match of command line and configuration file, which is
> IMHO the least surprise for users already familiar with "-N" and "-s".
>
> However, I'm not opposed to introduce "SessionType=none/subsystem", in
> case you like me to implement it that way.
>
> How should we proceed from here? Which variant should I implement?

I think SessionType=none/subsystem/default is the way to go. I'll
have some time to look at it next week, but if you want to implement
it then please don't let me stop you :)

Thanks again for your patience.

-d
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: Reminder: Add ssh_config equivalents of -N, -n and -f [ In reply to ]
Hi Damien,

Damien Miller wrote:
> I think SessionType=none/subsystem/default is the way to go. I'll
> have some time to look at it next week, but if you want to implement
> it then please don't let me stop you :)

Okay, finished:

https://github.com/openssh/openssh-portable/pull/231

I also replaced the internal 2 flags with a single option enum (integer).


Please note one subtle consequence here:

Combining the flags in a single value means that it is no longer
possible to have the "no_shell_flag" (-N) and "subsystem_flag" (-s)
enabled at the same time. This is good in itself, and among others,
this means that edge cases, where both "-N" and "-s" are given to ssh,
are now handled in a more logical way: The last provided one wins.

Is that okay?

Or, do we needed backwards-compatibility-by-all-means here?

(Which would mean in this case: "-N" always takes precedence over "-s".)


Best regards,
Volker

--
Volker Diels-Grabsch
----<<<((()))>>>----
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev