Categories
Linux

Enable SSH on ESXi

ESXi 3.5 does have SSH capablities but it is disabled and not supported by default. If you want to enable it, follow these steps:

  1. At the ESXi console press ALT-F1
  2. Type in "unsupported" and press Enter. You will not see the text as you type.
  3. You will see a Tech Support Mode warning and be prompted for the root password. Enter the root password and press enter
  4. Edit the inetd.conf file located at /etc/inetd.conf using VI
  5. Scroll down the file till you find the file that stares with #ssh, move the cursor over the # and press x
  6. Exit and Save by pressing ESC and typing :wq
  7. Type in "ps | grep inetd" and take note of the process ID
  8. Type in "kill -HUP <process ID from step 7>"
  9. You can now SSH in to the ESXi host

UPDATE: Confirmed to be working on ESXi 4.0 also

Categories
Freebsd

Passwordless ssh login with keys

Create a key with no passphrase on the source machine

[install@source ~]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/install/.ssh/id_rsa):
Created directory ‘/home/install/.ssh’.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/install/.ssh/id_rsa.
Your public key has been saved in /home/install/.ssh/id_rsa.pub.
The key fingerprint is:
66:c1:3f:95:c6:a9:d6:99:49:bf:a0:57:4f:a3:78:49 install@localhost.localdomain

Copy it to the destination machine…

[install@source ~]$ scp id_rsa.pub 10.50.2.50:~

On the destination machine create the .ssh directory and copy the id_rsa.pub to authorized_keys. If you have multiple keys you can just append it, something like this “cat id_rsa.pub >> authorized_keys”

[install@destination ~]$ mkdir .ssh
[install@destination ~]$ chmod 700 .ssh
[install@destination ~]$ cp id_rsa.pub .ssh/authorized_keys

Now you should be able to login…

[install@source .ssh]$ ssh 10.50.2.50
Last login: Fri Sep  5 14:18:01 2008 from 10.50.2.51
[install@destination ~]$