VMware Cloud Community

Enabling SSH on an ESXi host which is NOT a member in any vCenter - PowerCLI issues / consideration

Hello together

We have a "2-stage" problem, so to speak:


  1. How can you enable SSH on an ESXi host if this host is not (yet) a member of a vCenter? The only solution we found is that we use PowerCLI instead of JavaScript inside vRO. Are there alternative options?

  2. If we stick with PowerCLI, we would like to build some single, reusable actions. E.g. a PowerCLI action to enable SSH, another PowerCLI action that does some specific things, and a PowerCLI action that disables SSH.
    However, now we are wondering, if one PowerCli Action eanables SSH and then terminates, how can I "tell" the next PowerCLI Action that the previous PowerCLI Action has already logged-in on to the ESXi host? Somehow you have to be able to pass on these login credentials from one action to the next, right?

Please excuse my english, it's not my native language.

Kind regards

0 Kudos
1 Reply

I can't find other methods so I guess you have to go with powercli.

You can't reuse the session of a previous action, as each action will run in its own container, separated from others. You have to authenticate in each action.