Skip to content

How to configure passwordless access to your ESXi server

Jonathan Senkerik edited this page Apr 29, 2018 · 1 revision

How to configure the password / passwordless access to your ESXi server.

    esxi.esxi_password = 'prompt:'

*** NOTES about esxi_passwords & ssh keys!! ***

  1. 'prompt:' This will prompt you for the esxi password each time you run a vagrant command. This is the default.

  2. 'file:' or 'file:my_secret_file' This will read a plain text file containing the esxi password. The default filename is ~/.esxi_password, or you can specify any filename after the colon ':'.

  3. 'env:' or 'env:my_secret_env_var' This will read the esxi password via an environment variable. The default is $esxi_password, but you can specify any environment variable after the colon ':'.

Linux/Mac:
$ export esxi_password='my_secret_password'

Windows:
C:> SET esxi_password="my_secret_password"
  1. 'key:' or key:~/.ssh/some_ssh_private_key' Use ssh keys. The default is to use the system private keys, or you specify a custom private key after the colon ':'.

    To test connectivity. From your command line, you should be able to run following command without an error and get an esxi prompt.

    $ ssh root@ESXi_IP_ADDRESS
    

    The ssh connections to esxi will try the ssh private keys. However the ovftool does NOT! To make vagrant fully password-less, you will need to use other options. (set the password, use 'env:' or 'file:')

  2. esxi.esxi_password = 'my_esxi_password' Enter your esxi passowrd in clear text here... This is the least secure method because you may share this Vagrantfile without realizing the password is in clear text.