In an effort to streamline the install of ESXi, vmware removed the management console that was used by so many advanced administrators to get day to day work done. This wouldn’t be a problem if adequate substitutes had been provided, but the Virtual Infrastructure Client and remote command line just don’t cut it. Here is how you can re-enable ssh on an ESXi server and work around not having SCP.
First, enable ssh by going to your physical ESXi console, logging in and hitting Alt + F1.
When you Alt + hit F1, you will see a screen that doesn’t have any way for you to interact with it. type the word “unsupported” into that screen and press enter. You will now be prompted to enter your password and you’ll get a big message about this being an unsupported operating mode for ESXi. Ignore that.
Now you need to edit the /etc/inetd.conf file using vi. Find the line that starts with
#ssh
and remove the #.
reboot your server and ssh should be working (you could alternatively kill -HUP inetd, but rebooting works too).
Unfortunatly, while this gives us ssh access, it doesn’t give us scp (or sftp which is just a gui frontend to scp). But no worries, scp is just a GUI around STDIN and STDOUT redirect in ssh. Lets say we wanted to scp a file called test.txt over to our ESXi machine. Using ssh from my linux box (might work in ssh for windows, haven’t tried that) I run the following command
cat test.txt | ssh root@esx “cat >test.txt”
And test.txt is transferred to my ESXi box using ssh! I’ve already dumped several ISO and VMDK files straight into the SATA based VMFS stores on my ESXi server.