Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Feb 2020 18:38:17 +0100
From:      Per Hedeland <per@hedeland.org>
To:        Valeri Galtsev <galtsev@kicp.uchicago.edu>, =?UTF-8?Q?=c3=96zg=c3=bcr_Kazancci?= <ozgur@kazancci.com>
Cc:        David Mehler <dave.mehler@gmail.com>, freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: tightening sshd, removing server identification banner
Message-ID:  <3ef7eb70-8b38-332a-1276-9170e2480f0e@hedeland.org>
In-Reply-To: <0E539BE9-C479-4374-8568-5FDA5A910F3C@kicp.uchicago.edu>
References:  <CAPORhP4JmTB-Cf04Mgtae9EnHCRPe=5LHs_xtbZE%2BAPoP6pVbg@mail.gmail.com> <036b6d54c51d5d7ae9934415b60369f8@kazancci.com> <0E539BE9-C479-4374-8568-5FDA5A910F3C@kicp.uchicago.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-02-17 18:02, Valeri Galtsev wrote:
 >
 >
 >> On Feb 17, 2020, at 10:58 AM, Özgür Kazancci <ozgur@kazancci.com> wrote:
 >>
 >> Hello David,
 >>
 >> If you're sure you uncommented these lines,
 >> #VersionAddendum none
 >> #Banner none
 >>
 >
 > As far as I know, uncommenting lines in sshd_config is unnecessary. These are put there as commented lines to indicate defaults which sshd was build with, so they are already in effect. That is why 
good practice is when changing something to keep commented line as it is, and add next to it yours not commented different setting.

Agreed, but changing the commented value without uncommenting does
(obviously) not have any effect. The default sshd_config in
12.1-RELEASE has

#VersionAddendum FreeBSD-20180909

#Banner none

I.e. an uncommented

VersionAddendum none

is needed to remove the above text.

 > Valeri
 >
 >> and restarted the sshd, then there is no much else left -imho-. A complete removal of SSHD banner (if that's what you're trying to do) requires a manual edit of OpenSSH(d) files&complete 
complication of it from scratch.

I think the "SSH-2.0" part should be considered mandatory, it's part
of the protocol.

--Per

 >> Best,
 >> Özgür.
 >>
 >>
 >>
 >>
 >> On 17/02/2020 19:53, David Mehler wrote:
 >>> Hello,
 >>> I'm running FreeBSD 12.0. I'm atempting to tighten up my sshd
 >>> configuration. I've got things where I want them, except for the
 >>> connecting banner. I'm using sshaudit.com to test things and this is
 >>> what it's saying for the banner setting:
 >>> Banner:SSH-2.0-OpenSSH_7.8 FreeBSD-20180909
 >>> I would rather this be set to nothing or at most very minimal. Google
 >>> and the sshd_config man page reveals the Banner and VersionAdendum
 >>> options. I've set both to none.
 >>> PrintMotd no
 >>> #PrintLastLog yes
 >>> #VersionAddendum none
 >>> #Banner none
 >>> Can anyone tell me how to get the results I am looking for?
 >>> Thanks.
 >>> Dave.
 >>> _______________________________________________
 >>> freebsd-questions@freebsd.org mailing list
 >>> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
 >>> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
 >> _______________________________________________
 >> freebsd-questions@freebsd.org mailing list
 >> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
 >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
 >
 > ++++++++++++++++++++++++++++++++++++++++
 > Valeri Galtsev
 > Sr System Administrator
 > Department of Astronomy and Astrophysics
 > Kavli Institute for Cosmological Physics
 > University of Chicago
 > Phone: 773-702-4247
 > ++++++++++++++++++++++++++++++++++++++++
 >
 > _______________________________________________
 > freebsd-questions@freebsd.org mailing list
 > https://lists.freebsd.org/mailman/listinfo/freebsd-questions
 > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
 >




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ef7eb70-8b38-332a-1276-9170e2480f0e>