git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] fetch-pack: make the ssh connection quiet

From
Jan Stępień <jan@stepien.cc>
Date
Oct 28, 2010, 09:14 UTC
Message-ID
<20101028111403.db0f8593.jan@stepien.cc>
In-Reply-To
<7v1v7bclhe.fsf@alter.siamese.dyndns.org>

On Wed, 27 Oct 2010 15:35:41 -0700 Junio C Hamano <gitster@pobox.com> wrote:

Show 19 quoted lines
> Jan Stępień  <jstepien@users.sourceforge.net> writes:
> > The --quiet option passed to fetch-pack did not affect the ssh child
> > process. When an ssh server sent a motd it was displayed because the ssh
> > client wasn't launched with the -q option.
> 
> This is curious for a couple of reasons:
> 
> 1. "-q" option to "ssh" is not meant to supress "motd"; it is about
>    warning and diagnostics.  From man ssh(1):
> 
>      -q Quiet mode.  Causes most warning and diagnostic messages to be
>         suppressed.  Only fatal errors are displayed.  If a second -q is
>         given then even fatal errors are suppressed, except for those
>         produced due solely to bad argu‐ ments.
> 
> 2. "PrintMotd" defaults to "yes" but it is to specify whether the daemon
>    should print /etc/motd when a user logs in interactively.  I didn't
>    think fetch-pack logged in interactively, so why should this matter?
> 

You're right, fetch-pack doesn't log in interactively so the actual motd is not displayed. I made some research and it turned out that what I described in the commit message as the "motd" was in fact the Banner. Quoting man sshd_config(5):

  Banner  The contents of the specified file are sent to the remote
          user before authentication is allowed.  If the argument is
          “none” then no banner is displayed.  This option is only
          available for protocol version 2.  By default, no banner
          is displayed.

From what I've read it seems that the Banner is generally used to display some legal information, such as "this system can be used by authorised personnel only, others will be prosecuted".

I'd say that suppressing such information along with diagnostic messages might be expected after adding the "-q" flag to fetch-pack and other similar commands. Fatal errors will be printed anyway. The question is whether "--quiet" should suppress warnings as well. From my point of view it is reasonable or at least acceptable. An alternative solution might be to add another level of verbosity, namely "--silent".

Thanks,
-- 
Jan Stępień <jan@stepien.cc>
Previous: Junio C Hamano
Message 5 of 5 in “fetch-pack: make the ssh connection quiet”
  1. fetch-pack: make the ssh connection quietJan Stępień, Oct 27, 2010
  2. Drew NorthupOct 27, 2010
  3. Jan StępieńOct 27, 2010
  4. Junio C HamanoOct 27, 2010
  5. Jan StępieńOct 28, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.