This article is a second part of vCenter Server SSH received disconnect Too many authentication failures. In ther earlier article I resolved error without touching or configuring the VCSA (vCenter Server Appliance Server) to skip public key authentication. In this article I will configure VCSA server (VMware vCenter Server) to use public key authentication so I don't have do any extra settings on my system.
To use Public key authentication to access vCenter server is a one-time activity, To start configuring laptop or desktop to login vCenter Server hassle free and without any extra parameter to remember.
Use puTTygen (putty key generator) tool to generate public and private key pair. By default this tool is available on Windows 10. In the SearchBar find for PuTTYgen name. Click the Generate button and move the mouse over key area to generate random key based on the movement.
Public key for OpenSSH autherized_keys file is generated, copy it, additionally you can add key passphrase to secure the key. Copy the key. (You can download and store private key in secure location, it should not be shared with others, You can use it to recover public key if it is lost using private key).
On the vCenter server login I have used earlier article vCenter Server SSH received disconnect Too many authentication failures to login. I am under /root home folder, since I will be using the same root user to login remotely to vCenter server. The copied public key string needs to be stored in authorized_keys under .ssh folder.
You can use vi tool to open and edit .ssh/authorized_keys file, hit i button to edit, paste public key ssh-rsa string to the file. hit esc key, type :wq and click Enter button on keyboard. Verify keys are added to the file with cat command.
In the last verify OpenSSH connection on putty, ssh without pubkeyauthentication parameters or other tools, In my case all are successful.
Additionally if you don't want to enter password you can use private key on the putty to login passwordless. Go to PuTTy configuration >> Connection >> SSH >> Auth. Browse Private key file for authentication and try login remote VCSA server, It will not ask for password.
Useful Articles
RESOLVED : FAIL TO DEPLOY OVF TEMPLATE - TASK CANCELED BY USER
VMWare Web Client: Datastore browse files upload copy failed error
Resolved: HP ILO this page cannot be displayed ERR_SSL_BAD_RECORD_MAC_ALERT
Reset/Restart HP ILO (Integrated Lights-outs) using putty
Reset HP ILO password from Esxi server
ESXi HP Blade start issue Enclosure power event detected, System Halted until power condition is corrected
Esxi update individual component firmware on HP hardware: disk degraded not authenticated
Resolved syslog error: Call OptionManager.UpdateValues for object ha-adv-options on ESXi failed
Solved: Esxi server cannot joined into active directory domain
Solved Esxi host disconnected evaluation license expired
Connect-VIServer Error: Invalid server certificate. Use Set-PowerCLIConfiguration