Showing posts with label OpenSSH. Show all posts
Showing posts with label OpenSSH. Show all posts

Wednesday, November 16, 2011

SSH into ESXi 5 host using public key

Just a little follow up on my previous post.

If you want to enable OpenSSH Public Key Authentication on your ESXi 5 host, append contents of your public key to /etc/ssh/keys-USERNAME/authorized_keys file instead of usual ~/.ssh/authorized_keys file.

For example, to enable public key logins as root user, do the following:
cat ~/.ssh/id_rsa.pub | ssh root@esxi.machine.com 'cat >> /etc/ssh/keys-root/authorized_keys'

Obviously, SSH server needs to be enabled on the ESXi host before you can do that. As I mentioned in my ESXi 5 installation write up, starting with vSphere 5 vSphere 4.1 you can easily enable SSH via ESXi's Direct Console User Interface (DCUI) or vSphere Client.

Friday, November 11, 2011

OpenSSH Public Key Authentication

Secure SHell is awesome. I think it is one of the most valuable, yet taken for granted tools in Sysadmin's arsenal. This post is about Public Key Authentication, a feature that makes remote access of multiple systems not only faster, but also more secure.

I won't talk about how public keys work. If you don't know it yet, you could learn more here. The point is, I use Public Key Authentication (PKA) very often, on all types of OS, to connect to a large variety of hosts. So here are my preferred ways to set it up.

Wednesday, March 3, 2010

Making Pageant automatically load keys on startup

So I have a few private keys I generated for Public-Key SSH authentication. In Windows I manage SSH keys with Pageant - an SSH authentication agent for PuTTY. PuTTY is an awesome SSH/Telnet client for Windows that also comes with a suite of helper utilities like key generator and agent.

My work week starts like this: I log into my Windows workstation, open Pageant and load my keys one after another. Since the keys are encrypted I have to enter a password for each key. Once the keys are in memory I can securely log into multitude of Linux servers (that have the public key) without enduring their login prompt each time. Pretty nice, but there is still some room for improvement.