Configure Login Banner in Ubuntu

1. Edit the Banner message

    sudo nano /etc/issue.net

    Sample text:

    Authorized access only. Unauthorized use is prohibited and may be monitored.

    2. Configure SSH to use the Banner

    sudo nano /etc/ssh/sshd_config

    Ensure “Banner /etc/issue.net”

    Then restart SSH

    sudo systemctl restart ssh

    This banner will now show before SSH login prompts

    3. Post-login Message

    Use MOTD (Message of the Day) to display info after login

    sudo nano /etc/motd

    Example Banner Text:

    NOTICE: This system is for authorized users only. Activity may be monitored and reported to security personnel. Disconnect immediately if you are not an authorized user.