You must edit the /etc/ssh/sshd_config file on all your hosts to reconfigure the SSH service. You also remove the authorized_keys file on all ESXi hosts and edit the /etc/pam.d/passwd file to configure password settings. Before you can log in to a host and change the configuration file, you must disable lockdown mode.
You perform the procedure on all ESXi hosts in Region B.
Procedure
- In a Web browser, log in to vCenter Server by using the vSphere Client.
Settings Value URL https://lax01m01vc01.lax01.rainpole.local/ui User name administrator@vsphere.local Password vsphere_admin_password - Disable lockdown mode on the lax01m01esx01.sfo01.rainpole.local host.
- In the Hosts and Clusters inventory, expand the entire lax01m01vc01.lax01.rainpole.local tree.
- Under the lax01-m01dc data center, select the lax01m01esx01.lax01.rainpole.local host object and click the Configure tab.
- Click the Security Profile tab on the right.
- Under Lockdown Mode, click Edit.
- In the Lockdown Mode dialog box, select Disabled and click OK.
- Log in to the
lax01m01esx01.sfo01.rainpole.localESXi host by using a Secure Shell (SSH) client.Setting Value FQDN lax01m01esx01.lax01.rainpole.local User name root Password root_user_password - Rename the existing sshd_config file for backup.
mv /etc/ssh/sshd_config /etc/ssh/sshd_config.backup - Create a new sshd_config file in the /etc/ssh folder with the NIST 800-53 configurations.
Table 1. Configurations to Perform Configuration ID
Description
NIST80053-VI-ESXI-CFG-00001Use only FIPS-approved algorithms for encryption.
NIST80053-VI-ESXI-CFG-00003Set the
IgnoreRhostsoption to yes to force users to enter a password when authenticating with SSH.NIST80053-VI-ESXI-CFG-00004Set the
HostbasedAuthenticationoption to no to disable authentication through trusted hosts.NIST80053-VI-ESXI-CFG-00005Set the
PermitRootLoginoption to no to disable SSH access for the root user.NIST80053-VI-ESXI-CFG-00006Set the
PermitEmptyPasswordsoption to no to prevent users with blank password from using SSH.NIST80053-VI-ESXI-CFG-00007Set the
PermitUserEnvironmentoption to no to forbid users presenting environment options to the SSH deamon.NIST80053-VI-ESXI-CFG-00009Set the
GSSAPIAuthenticationoption to no to disable GSSAPI authentication.NIST80053-VI-ESXI-CFG-00010Set the
KerberosAuthenticationto no to disable the Kerberos protocol.NIST80053-VI-ESXI-CFG-00011Set the
StrictModesoption to yes to force permissions checks on keyfiles and directories.NIST80053-VI-ESXI-CFG-00012Set the
Compressionoption to no to deny compression proir to a successful user authentication.NIST80053-VI-ESXI-CFG-00013Set the
GatewayPortsoption to no to prevent connecting to forwarded ports from outside the host.NIST80053-VI-ESXI-CFG-00015Delete all values for
AcceptEnvto reject environment variables from the client.NIST80053-VI-ESXI-CFG-00016Set the
PermitTunneloption to no to prevent the SSH daemon the ability to create network tunnels over an SSH connection.NIST80053-VI-ESXI-CFG-00017Set the
ClientAliveCountMaxoption to 3 as the total number of checkalive messages sent by the SSH server without response by the SSH client.NIST80053-VI-ESXI-CFG-00019Set the
MaxSessionsoption to 1 as the maximum number of open sessions permitted per network connection.- Open the VI editor to add a new sshd_config file in /etc/ssh.
vi /etc/ssh/sshd_config - In the VI editor, enter the configurations to the sshd_config file.
# Version 6.7.2.0 # running from inetd # Port 2200 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,aes192-cbc,aes256-cbc Protocol 2 IgnoreRhosts yes HostbasedAuthentication no PermitRootLogin no PermitEmptyPasswords no PermitUserEnvironment no MACs hmac-sha1,hmac-sha2-256,hmac-sha2-512 GSSAPIAuthentication no KerberosAuthentication no StrictModes yes Compression no GatewayPorts no X11Forwarding no AcceptEnv PermitTunnel no ClientAliveCountMax 3 ClientAliveInterval 200 MaxSessions 1 UsePrivilegeSeparation no SyslogFacility auth LogLevel info PrintMotd yes PrintLastLog no TCPKeepAlive yes Banner /etc/issue
- Save and close the VI editor.
- Restart the SSH service to apply the new configurations.
/etc/init.d/SSH restart
- Open the VI editor to add a new sshd_config file in /etc/ssh.
-
NIST80053-VI-ESXI-CFG-00107Remove the SSH authorized_keys file from /etc/ssh/keys-root/.rm /etc/ssh/keys-root/authorized_keys -
NIST80053-VI-ESXI-CFG-00109Configure the value of the remember option to5in the /etc/pam.d/passwd file to restrict the reuse of the last five passwords.NIST80053- Open the VI editor to to edit the /etc/pam.d/passwd file.
vi /etc/pam.d/passwd - Add remember=5 at the end of the password sufficient line in the file.
password sufficient /lib/security/$ISA/pam_unix.so use_authtok nullok shadow sha512 remember=5
- Save and close the VI editor.
- Open the VI editor to to edit the /etc/pam.d/passwd file.
- Repeat the procedure for all remaining hosts in Region B.