Add a remote node in rundeck

Viewed 29259

I want to be able to execute shell commands on remote nodes using Rundeck and I found this video that explains how to do that but I don't understand the private-key part and how to configure it. I keep getting the following error:

Authentication failure connecting to node: "test-001". Make sure your resource definitions and credentials are up to date. Failed: AuthenticationFailure: Authentication failure connecting to node: "test-001". Make sure your resource definitions and credentials are up to date.

I have a remote server set up and I configured the resource.xml file like the following:

<node name="test-001" description="demo for test" tags="demo" hostname="10.10.10.10:22"  osFamily="unix" osName="Linux" osVersion="2.6.32" username="demo"  />

Do I need to add the ssh-key value to the xml file? If so, do I have to copy the public or private keys from the Rundeck server to the host server?
Also, the username demo has a password too, so how can I define it?

3 Answers

Documentation is fairly all over the place with different versions having different keywords and there being no warnings in case you are using the wrong one.

The relevant documentation is here: https://docs.rundeck.com/2.11.3/plugins-user-guide/ssh-plugins.html

You need to specify:

ssh-authentication: privateKey

...and:

ssh-keypath: /path/directly/to/.ssh/id_rsa

(Assuming you are using filesystem key storage.)

Remove passphrase from your keys with:

ssh-keygen -p -m PEM -f /path/to/your/.ssh/id_rsa

...and do not forget to mke sure the id_rsa file is owned by rundeck and has suitably restricted permissions.

In my case I had a passpharse in my private key. Make sure your private key passpharse is empty.

Related