Categories
How-To Technical

SSH into ESXi 5 host using public key authentication

CLI

I do this with my other linux host over here @ jermsmit.com so why not with my ESXi 5 hosts. Using OpenSSH Public Key Authentication on ESXi 5 required a few things.

  1. You need to enable SSH
  2. You need an SSH client (I use putty)
  3. If you already have a authorized_keys file handy use it or make a new one
  4. And Filezilla or WinSCP handy will also help.

Now all you need to do is locate the following directory on your ESXi 5 host: /etc/ssh/keys-root and copy your authorized_keys file to this location. Unlike standard linux system where the file is located /.ssh/ ESXi has a different layout.

I used WinSCP to do my file copies to my system here, use whatever you feel is best for you. And that’s about it, you can now ssh into yourself w/o the need of entering your password.

Next I think I will attempt my hand at some scripting to automate some tasks; when I do, you will all be the first to know.

Feel free to leave jermsmit.com and head over to this link on Public-key cryptography. The more you know the better we all are