When a login occurs, the SSH server can take special actions. Here, we discuss:
Printing welcome messages for the user
Setting environment variables
Taking arbitrary actions with initialization scripts
sshd can display custom messages
for the user before and after authentication. Before authentication,
the SSH server can optionally display the contents of any file you
select with the
# OpenSSH Banner /usr/local/etc/warning.txt # Tectia BannerMessageFile /usr/local/etc/warning.txt
By default, OpenSSH displays no banner message, whereas Tectia displays the contents of /etc/ssh2/ssh_banner_message if the file exists. The banner message is often used for legal statements that forbid unauthorized access. Since the file is sent before authentication, be careful that it doesn't reveal sensitive information.
After authentication, both OpenSSH's and Tectia's
sshd optionally prints the standard Unix "message
of the day" file ( /etc/motd ).
This output may be turned on and off with the
PrintMotd keyword with the value
yes (the default) or
Since most Unix shells print /etc/motd on login, this SSH feature is often redundant and turned off.
For Tectia, a message about email (e.g., "You have mail") is
printed on login if the
keyword has the value of
default), or the message is skipped if the value is
# Tectia CheckMail yes ...