6.5.1

Table Of Contents
ESXi SSH Keys
SSH keys can restrict, control, and secure access to an ESXi host. An SSH key can allow a trusted user
or script to log in to a host without specifying a password.
You can copy the SSH key to the host by using the vifs vSphere CLI command. See Getting Started
with vSphere Command-Line Interfaces for information on installing and using the vSphere CLI command
set. You can also use HTTPS PUT to copy the SSK key to the host.
Instead of generating the keys externally and uploading them, you can create the keys on the ESXi host
and download them. See VMware Knowledge Base article 1002866.
Enabling SSH and adding SSH keys to the host has inherent risks. Weigh the potential risk of exposing a
user name and password against the risk of intrusion by a user who has a trusted key.
Note For ESXi 5.0 and earlier, a user with an SSH key can access the host even when the host is in
lockdown mode. Starting with ESXi 5.1, a user with an SSH key can no longer access a host that is in
lockdown mode.
Upload an SSH Key Using a vifs Command
If you decide that you want to use authorized keys to log in to a host with SSH, you can upload authorized
keys with a vifs command.
Note Because authorized keys allow SSH access without requiring user authentication, consider
carefully whether you want to use SSH keys in your environment.
Authorized keys allow you to authenticate remote access to a host. When users or scripts try to access a
host with SSH, the key provides authentication without a password. With authorized keys, you can
automate authentication, which is useful when you write scripts to perform routine tasks.
You can upload the following types of SSH keys to a host.
n
Authorized keys file for the root user
n
RSA key
n
RSA public key
Starting with the vSphere 6.0 Update 2 release, DSS/DSA keys are no longer supported.
Important Do not modify the /etc/ssh/sshd_config file. If you do, you make a change that the host
daemon (hostd) knows nothing about.
vSphere Security
VMware, Inc. 48