Restore Disabled SSH Login to vCenter / VCSA

Mindwatering Incorporated

Author: Tripp W Black

Created: 10/31/2017 at 06:13 PM

 

Category:
VMWare
vCenter

Issue:
Need to restore SSH access to VCSA.

Steps:
1. In not enabled, enable SSH in the VSphere Web Client for VCSA.
a. Home --> System Configuration --> Nodes --> Right click the vCenter name on right, choose Edit Settings.
b. Select Access on left, check the Enable SSH login option. click OK.

If login to 5480 or SSH doesn't work, continue to step 2 below.

2. Note the host that is running the VCSA. Log out of the VCSA / vSphere Web Client.

3. Open the host's Web Client, and open the vCenter Remote Console.
a. Open the host client:
e.g.
https://vmhost3.mindwatering.net/ui/#/host/vms
(enter root and the host password)

b. Locate the vCenter VM, and click the button to open the VM console to either a new tab, window, or the VMware Remote Console program.

c. Back in the host Web Client, choose Actions --> Guest OS --> Restart.

d. Switch back to the Remote Console window you just opened. Wait for the Photon launch screen and click "e" as soon as you see the screen display. This will display the GNU GRUB boot edit menu.

e. On the GNU GRUB screen, use the right and down arrows to get to the end of the linux line (which is visually on the line below, but keep just clicking the right arrow to get to the end of line. Add to the end of the line, add rw init=/bin/bash.


f. Send the F10 or CNTL + X key to boot with the updated instructions.

g. At the root # prompt, enter the following:
# pam_tally2 --user=root --reset
( This will reset a disabled/locked root login. )

# passwd
( Enter the new password twice to set the password to what you want. )

# reboot


4. Open up your SSH client or a Terminal window, and SSH to the server.
$ ssh root@vmhost3.mindwatering.net
( Enter your password, and you should be into the VCSA. )



previous page

×