Changing the SSH login and welcome message

Note: This post is over 3 months old and may be outdated or superseded by additional information.

If you’d like to change the message displayed before logging in to the server

sudo nano /etc/ssh/sshd_config

And add (or uncomment) the line

Banner /etc/banner

Note: /etc/banner can be whatever file you want.

Now edit the file you referenced, for example

sudo nano /etc/banner

And enter your welcome message.

You may need to restart sshd before your changes take effect

sudo /etc/init.d/ssh restart

If you want to change the message displayed after logging in edit /etc/motd.

sudo nano /etc/motd

Now you can put whatever you want to display, e.g.

              _
__      _____| | ___ ___  _ __ ___   ___
\ \ /\ / / _ \ |/ __/ _ \| '_ ` _ \ / _ \
 \ V  V /  __/ | (_| (_) | | | | | |  __/
  \_/\_/ \___|_|\___\___/|_| |_| |_|\___|