VMware Cloud Community
Eds89
Enthusiast
Enthusiast
Jump to solution

vSphere 6.5 key based SSH login - assistance with setup

Hi,

I am wondering if anyone can help me in firstly determining if it is possible to setup passwordless, key based authentication for SSH in ESXi, and secondly how I would go about setting this up between an ESXi 6.5 host and a FreeBSD (FreeNAS) server.

I have FreeNAS running as a VM, with storage being passed back through to the host via iSCSI.

When the host reboots, the FreeNAS VM auto starts, but by this time ESXi has already initialised iSCSI, and cannot find any targets, I need to setup a startup script in FreeNAS to SSH into the host, and run a scan on the iSCSI HBA, and then ideally trigger an auto start of the remaining VMs stored on that iSCSI datastore.

Is this possible, and if so, how do I achieve it?

Thanks

Eds

0 Kudos
1 Solution

Accepted Solutions
Eds89
Enthusiast
Enthusiast
Jump to solution

I have found this blog post that describes the setup of this process which I have followed:

Log into a VMware ESXi using SSH keys

After creating a key pair on a Linux box, I have copied the public key and appended to the authorised_keys file on the host, and successfully used the private key for passwordless login to the host remotely.

I am now going to test a FreeNAS startup script to connect to the host and run a vmhba rescan.

View solution in original post

0 Kudos
3 Replies
MBreidenbach0
Hot Shot
Hot Shot
Jump to solution

Not exactly what you asked but...

HPE have a script for their StoreVirtual VSA which rescans storage until the LUNs are up...

Index of /hpe/HPE-StoreVirtual/hpe-iscsi-rescan

Maybe it can be modified to do what you need.

0 Kudos
Eds89
Enthusiast
Enthusiast
Jump to solution

Thanks, sounds like it's kind of what I want but....

Any advice on how I would go about editing it?

I can't see any script as such, only a VIB.

Cheers

Eds

0 Kudos
Eds89
Enthusiast
Enthusiast
Jump to solution

I have found this blog post that describes the setup of this process which I have followed:

Log into a VMware ESXi using SSH keys

After creating a key pair on a Linux box, I have copied the public key and appended to the authorised_keys file on the host, and successfully used the private key for passwordless login to the host remotely.

I am now going to test a FreeNAS startup script to connect to the host and run a vmhba rescan.

0 Kudos