ssh pre-login message

Oliver Fromme olli at lurza.secnetix.de
Thu Sep 15 04:19:42 PDT 2005


Jakob Breivik Grimstveit <jakob at grimstveit.no> wrote:
 > Aaron Holmes wrote on Mon, 05 Sep 2005 03:11:
 > > I'm not entirely sure this is the proper place for this, but how can i 
 > > get a pre-login message to show up before the "login as:" prompt  on
 > > freebsd 5x
 > 
 > From `man sshd_config`:
 > 
 >      Banner  In some jurisdictions, sending a warning message before authenti-
 >              cation may be relevant for getting legal protection.  The con-
 >              tents of the specified file are sent to the remote user before
 >              authentication is allowed.  This option is only available for
 >              protocol version 2.  By default, no banner is displayed.

In case the OP had local logins in mind (syscons, not ssh),
the have a look at the gettytab(5) manpage.  It documents
two capabilities that can be added to /etc/gettytab for
local logins:  The "im" capability for short banner strings
(one line) that will be printed before the login prompt,
and the "if" capability to specify a file name.

After changing the gettytab, you need to kill the getty
processes.  They will be restarted automatically by init(8).

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"Python tricks" is a tough one, cuz the language is so clean. E.g.,
C makes an art of confusing pointers with arrays and strings, which
leads to lotsa neat pointer tricks; APL mistakes everything for an
array, leading to neat one-liners; and Perl confuses everything
period, making each line a joyous adventure <wink>.
        -- Tim Peters


More information about the freebsd-chat mailing list