December 22, 2024

ESX: Security Banner at Console Login with Color

The guys at XtraVirt have a good article: ESX3: Security Banner at Console Login. This article tells you how to customize your login prompt and message of the day.

Good information for those that want to customize their login banners. This article actually works for ESX 2.x and above.

I ran across an application that allows me to easily add color to this login banner, if your console/ssh client supports it.

The application is MOTD Maker. You can find it here: http://edeca.net/site/programs:motdmaker

So I took the default banner from the above article:

********************************************** WARNING: SECURITY MESSAGE  ********  AUTHORIZED ACCESS TO THIS SYSTEM  ****              ONLY!                 **** ACCESS MUST BE CLEARED WITH ONSITE ****         SECURITY CONTROLLER        **********************************************************************************

And pasted it into the MOTD Maker. Adding colors is really easy with the MOTD Maker, just select the text…

Select the color you wish to make it:

Now the color will change.

Now I made it uniform by selecting the other asterisks.

Now select “Generate ANSI” and either cave this to a file, or save it to your clipboard. I recommend saving it to a file. I’ve had some issues with puTTY when it comes to pasting.

If you saved it to a file, you can upload that to your ESX server, and rename it to /etc/motd or /etc/issue.

Additionally, one thing that they didn’t mention in the above mentioned article… /etc/issue is for local console connections, and /etc/issue.net is for ssh/terminal connections.

That being said, you could have different information for local or remote connections. And because /etc/motd is run after login, you can add additional information there.

3 thoughts on “ESX: Security Banner at Console Login with Color

  1. Thanks for the post however I tried to upload the file and everytime the logon banner returns as

    [33m***************************************************
    ***************************************************
    **********[37m WARNING: SECURITY MESSAGE and so on instead of showing colors

    I am uploading the file with FastSCP any idea what am I doing wrong?

    Thanks

  2. I’d copy the content into your clipboard, and then ssh into your ESX.

    Then I’d use vi to modify the file that you are wanting to put this in.

    so vi /etc/motd

    press “i” for insert mode.

    right click with your mouse to past the content.

    Then type “:w!” to write the file.

    Then type “:q!” to exit.

    You can skip the last 2 steps by just pressing “SHIFT+ZZ”, as it will write the file, and close it.

    Good luck.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.