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/issue.net

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

Now connect to your box:
ssh-login