WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / ESXi / Easily manage ESXi & VCSA SSH login banner & MOTD in vSphere 6.0

Easily manage ESXi & VCSA SSH login banner & MOTD in vSphere 6.0

02.27.2015 by William Lam // 3 Comments

For customers who have a requirement to configure an SSH login banner and/or message of the day (MOTD) for ESXi or vCenter Server, this usually meant manually editing the /etc/issues (login banner) and /etc/motd (MOTD) configuration files. In vSphere 6.0, this has now been simplified by providing vSphere APIs to allow administrators to easily view and configure SSH login banner and MOTD for both ESXi and VCSA (this does not apply to vCenter Server for Windows).

For ESXi, there are two new ESXi Advanced properties called Config.Etc.issue and Config.Etc.motd and this can also be viewed and edited using the vSphere Web/C# Client as seen in the screenshot below:

esxi-issues-motd
For vCenter Server, there are also two new Advanced Options called etc.issue and etc.motd which can also be viewed and edited using the vSphere Web/C# Client as seen in the screenshot below:

vcsa-motd-issues

What's Displayed

The /etc/issues displays a banner during an SSH login session, this means that you will see the message during the login as highlighted in the screenshot below:

esxi-issues
The /etc/motd displays a banner after a successful SSH login as highlighted in the screenshot below:

esxi-motd

How to Automate

You can use both the vSphere API/CLI to modify the issues and motd configurations. In the examples below, I will be using PowerCLI to demonstrate retrieving and setting the two properties.

Retrieve /etc/issues for VCSA

Get-AdvancedSetting -Entity $vc -Name "etc.issue" | Format-List

Set /etc/issues for VCSA

$msg = "
beware
you
are
entering
the
house
of
Cormac
the
grey
"
Get-AdvancedSetting -Entity $vc -Name "etc.issue" | Set-AdvancedSetting -Value $msg

Retrieve /etc/motd for VCSA

Get-AdvancedSetting -Entity $vc -Name "etc.motd" | Format-List

Set /etc/motd for VCSA

Get-AdvancedSetting -Entity $vc -Name "etc.motd" | Set-AdvancedSetting -Value $msg

Retrieve /etc/issues for ESXi

Get-VmHostAdvancedConfiguration -Name "Config.Etc.issue"

Set /etc/issues for ESXi

$msg = "
beware
you
are
entering
the
house
of
Cormac
the
grey
"
Set-VMHostAdvancedConfiguration -Name "Config.Etc.issue" -Value $msg

Retrieve /etc/motd for ESXi

Get-VmHostAdvancedConfiguration -Name "Config.Etc.issue"

Set /etc/motd for ESXi

Set-VMHostAdvancedConfiguration -Name "Config.Etc.motd" -Value $msg

More from my site

  • How to customize the new vSphere 6.0 Web Client login UI?
  • How to remotely run appliancesh & other shell commands on VCSA w/o requiring SSH?
  • Will I get Photon OS when I upgrade my VCSA 5.5/6.0 to VCSA 6.5?
  • How to change the default ports on the vCenter Server Appliance in vSphere 6.0?
  • Which Platform Services Controller (PSC) is my vCenter Server pointing to?

Categories // ESXi, VCSA, vSphere 6.0 Tags // issues, motd, ssh, VCSA, vcva, vSphere 6.0

Comments

  1. *protectedTotie Bash says

    11/03/2017 at 12:35 pm

    I'm getting "The value of the specified advanced setting 'vpxd.motd' is read only." after running
    Get-AdvancedSetting -Entity 10.10.25.101 -Name "vpxd.motd" | Set-AdvancedSetting -Value $msg

    Reply
  2. *protectedShaneVB says

    12/23/2019 at 8:22 am

    I wanted to close the loop on this comment as I hit the same issue and it lead me here. Hoping it will save time for others. I was able to set vpxd motd through session manager

    $si = Get-View ServiceInstance -Server $session
    $sm = Get-View $si.Content.SessionManager -Server $session
    $sm.UpdateServiceMessage($msg)

    Reply
  3. *protectedyuri says

    04/07/2022 at 3:53 am

    hi guys!
    has anyone faced the issue with adv setting etc.motd when creating host profile - html5 client does not allow to enter newlines and as a result motd banner ends with system prompt in the same line?
    is there any way to put newlines into that text field?

    Reply

Thanks for the comment!Cancel reply

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

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...