SSH Login Banner

Want a custom banner or warning message when a user connects via SSH on your server?

Skill level: Beginner
OS: Linux
Prerequisites: Understand how to edit a file with vim or other text editor in Linux.
Dependencies: Config files:
/etc/ssh/sshd_config /etc/

  1. Open /etc/ssh/sshd_config and look for the line with Banner in it and point it to your /etc/ file:
Banner /etc/  
  1. Generate a banner:
    figlet -f banner [string]
  2. Copy and paste your banner into /etc/ to add your message.
  3. Restart sshd:
    sudo -i service sshd restart

Now connect to your box: