Tuesday, June 09, 2015

LoadRunner, SSH and Remote Agents

I'm running LoadRunner 11.52, RTE with SSH and some remote agent servers to run the load.

And it won't work. The scripts work fine with Vugen but won't work with the Controller.

The reason is this:

[HKEY_CURRENT_USER\Software\Ericom Software\SSH\SshHostKeys]
"rsa2@22:blablabla"="0x25,randomstringforsshkey"

This little piece of crap needs to be in the registry before Ericom - which LoadRunner uses for your SSH connection can connect. It doesn't use Plink, it doesn't use any clever stuff. And if you're using a remote agent with a local system account, whatever I tried - IT DOES NOT WORK!

There are people who claim if you convert this into a HKEY_LOCAL_MACHINE registry entry, it should work, it did not in my case.

In the end I threw up the towel, asked the LR agent to be run as a named user, ran the script ONCE with that user using Vugen - this loaded the key into the registry - and then everything worked from the Controller.

The key is loaded to the registry when you connect to it first time - it pops up a window and asks if you are happy with the fingerprint and want to save it - which you answer by clicking to the "YESSSS" button", unless you're an idiot.

Guess what. LoadRunner is not clever enough to auto-accept this key if you are running this inside the controller. It still prompts for it. You just never see the prompt. It's hanging there, in the ether, waiting for a ghost to find it and try to touch with its cotton rags and see if it can activate the YESSSSSSSS button, forever....

Of course, this is very annoying. For every different server and every different controller you want to use, you have to go through this.

You can have short-cuts. You can do it in one server, then save the registry keys and import into the servers but still, you got to use a named user, just don't bother with the local system account, it's just not worth the stress it's going to cause you.

Probably will apply to 12 as well.