Here we describe the procedure to establish passwordless SSH connection to ESX host from ubuntu machine.
- First, let us login into the local machine and generate the authentication key through the following command.
ssh-keygen -t rsaGenerating public/private rsa key pair.
Enter file in which to save the key (/home/giri/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/giri/.ssh/id_rsa.
Your public key has been saved in /home/giri/.ssh/id_rsa.pub.
The key fingerprint is:
The key's randomart image is:
| .. |
| .*+++ |
| . S ..*o .|
| o .. o.. .|
| . . . .+.+ .. .|
| = = . o+=.+ ..|
|.+o*o*Eo .++.. o|
- After generating the key pair, the same has to be copied to the remote machine. In ESX, the location of ssh specific files are located in `/etc/ssh` directory. This is different from linux operating systems. So ,we need to copy the public key into that directory.
cat .ssh/id_rsa.pub | ssh firstname.lastname@example.org 'cat >> /etc/ssh/authorized_keys'
You will be prompted for remote machine’s password. After copying the public key successfully, the passwordless SSH to the remote machine will be established successfully.
user@machine1:~$ ssh email@example.com
The time and date of this login have been sent to the system logs.VMware offers supported, powerful system administration tools. Please
see www.vmware.com/go/sysadmintools for details.The ESXi Shell can be disabled by an administrative user. See the
vSphere Security documentation for more information.
Thus, we can enable passwordless SSH between linux and ESX host.