How to easily add an ESXi SSH login message banner

ESXi issues message

Preparing for some upcoming audits, I noticed one of the checkpoints was to ensure each ESXi host was configured with a warning banner stating the machine is being monitored and audited when someone logs into the ESXi host via SSH. This type of message is something you see on most any company or government computer before you login.

There are two message types that can be used to achieve this, the first being login banner (/etc/issue) and MOTD (/etc/motd). The difference between the two are where they are shown. The login banner is shown between the username and password inputs during login, while the MOTD is displayed after a user has successfully logged into SSH.

How to change ESXi SSH login banner via SSH

For my purposes I’m going to change the login banner so that my disclaimer is shown right away.

  1. SSH into your host and type:
    vi /etc/issue
  2. Press i on your keyboard to enter insert mode and then type your message to be displayed.
  3. Press Esc on your keyboard to exit insert mode then type ZZ, which will save and exit VI.
  4. Finally restart SSH by typing the following:
    /etc/init.d/SSH restart

If you would rather your message be shown after login, simply change /etc/issue to /etc/motd in step one above.

How to change ESXi SSH login banner via vSphere client

You can also changes the messages in both web and thick vSphere clients (versions 5.5 and above):

vSphere 5.5 web client:
ssh message webclient

vSphere 5.5 thick client:
ssh message thickclient

One issue I ran into when using the clients to edit the ESXi SSH login message was adding paragraphs or line breaks in the message (like the screen shot at the top of this post). If you have simple, short messages then editing the Login Banner and/or MOTD via the clients worked great, otherwise using SSH and vi was a better method for me.

Similar Posts

  • Increase incremental backup speed by enabling CBT

    In a recent VMware environment I was working in, we noticed that our incremental backups was taking a long time (like up to 7-8 hours) to complete. After digging around it was found that VMware actually has a feature built-in since version 4 called Change Block Tracking (CBT). CBT will track any blocks that were changed since the last backup and tag them and stores the information in a -CTK file. The obvious benefit is that now the third party software only backs up the changed block and not the entire VM each time, reducing the amount of data being backed thus speeding up backups and even lowers the CPU utilization on the VM host.

    CBT is disabled by default though there are some backup tools that will enable it automatically or you can enable it manually which can easily be done following these steps:

    Read More “Increase incremental backup speed by enabling CBT”

  • How to install and configure vRealize Operations Manager 6.0.1

    VMware vRealize Operations Manager

    vRealize Operations Manager is the successor of vCenter Operation Manager which consists of much more then a simple name change, but several changes in the product over all. Just one of the new changes is that vRealize Operation Manager can now be deployed as a single virtual appliance, or on a Windows or Linux machine.

    This post we’ll walk through installing and configuring vRealize Operations Manager 6.0.1 step by step.

    Read More “How to install and configure vRealize Operations Manager 6.0.1”

  • vSphere 5.1 Release Date leaked, maybe?

    Looks like Sammy Bogaert over at Boerlowie’s Blog has possibly found the release date of vSphere 5.1… maybe?

    I was about to download vSphere Update Manager PowerCLI 5.0.

    I followed the main site and wanted to check the documentation first. So I clicked the Documentation button.

    vmware update manager

    This lead me to the Docs of Update Manager PowerCLI 5.1! That’s right, 5.1! With a release date of 10 September 2012.

    vsphere5.1 release date

    None of the links for 5.1 work, so no news on any new features…

    Guess somebody at VMware was a bit too fast to update the website

    Nice find Sammy, guess time will tell if the Sept. 10th date is the actual release date or not.

  • How to fix VMware Converter error “FAILED: The VSS snapshots cannot be stored”

    While moving some VM’s from Hyper-V to VMware using VMware Converter a VM failed to convert with the error: FAILED: The VSS snapshots cannot be stored.

    FAILED: The VSS snapshots cannot be stored because there is not enough space on the source volumes or because the source machine does not have any NTFS volumes. Error code: 2147754783 (0x8004231F).

    Come to find out the System Reserved partition was full. Our soon to be retired Appassure backup application was nice enough to fill up the volume.

    Luckily Appassure is being replaced by Veeam and fixing the above VMware Converter error is an easy fix.

    Read More “How to fix VMware Converter error “FAILED: The VSS snapshots cannot be stored””

  • My VMware View Windows 7 Optimization Guide

    These are the few steps I do when creating a new "Golden" image. Luckily I don’t have to do these steps all the time as I’ll create the "Golden" image when there is a new upgrade such as when we went from View 4.6 to View 5.0.1. I like to have a new fresh machine using new virtual hardware from the start. You could certainly just upgrade the virtual hardware on the "Golden" image, I just prefer to start clean.

    At any rate, here’s my list. Hopefully someone might find it somewhat useful and maybe even others can improve upon it.

    Preparing a new virtual machine

    1. Create New Virtual Machine – FILE > NEW > VIRTUAL MACHINE (CTRL+N)
    2. Under Configuration select CUSTOM.
    3. Select a Name, Folder, Host, Cluster, and Storage.
    4. Under Guest Operating System select Windows and then Windows 7 32bit under the Version drop down.
    5. Select which Network (VLAN) and under Adapter select VMXNET 3.
    6. Configure disk size to 30GB THIN provisioned.

    Read More “My VMware View Windows 7 Optimization Guide”

  • Shrink a thin provisioned VMDK disk

    When maintaining a Horizon View environment I like to keep my parent images as small as possible and over time a thin provision disk can start to grow on you if you don’t watch it – be it from downloading installers, updates, or even running disk defrag. While there isn’t a simple, one click button in the View Administrator Console there is a fairly easy manual method using vmfkstools.

    Before we can use “vmkfstools” to shrink the VMDK file we must zero out any unused space on the thin provisioned disk. A simple way of doing this is by using a free utility called SDelete from Sysinternals.

    Read More “Shrink a thin provisioned VMDK disk”

Leave a Reply

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

2 Comments