Whenever you log in to a remote SSH server, you'll be greeted with some messages before being presented the shell prompt. It could be SSH-specific messages or generic terminal login messages.

The banners or MOTD (Message Of The Day) could display some valuable messages though some would consider it a nuisance and want to go straight to the command prompt.

You can disable or edit these banners or MOTD messages when logging in by configuring the SSH server.

Steps to suppress or customize login welcome messages for SSH:

  1. Launch terminal.
  2. Open SSHd configuration file using your preferred text editor.

    $ sudo vi /etc/ssh/sshd_config [sudo] password for user:

  3. Look for Banner directive and set the value to none.

    Banner none

    Add the line if it doesn't already exist and remove # at the beginning of the line if it exists.

    Set the value to the path of a file and add your text to create a custom banner message to the file.

  4. Look for PrintMotd directive and set the value to no.

    PrintMotd no

    Add the line if it doesn't already exist and remove # at the beginning of the line if it exists.

    Set the value to yes and change the /etc/motd file for custom Message Of The Day.

  5. Disable execution of motd scripts

    $ sudo chmod -x /etc/update-motd.d/*

    Selectively disable existing scripts or add your own to create a custom message.