Skip to main content

Use SSH on Linux/Unix Nodes

Use SSH on Linux/Unix Nodes

Rundeck allows users to dispatch jobs to remote Linux/UNIX servers to manage and automate any task using Rundeck workflows. The most common protocol for connecting to Linux/Unix servers is SSH. This is an example of how to add a remote node and configure Rundeck to use SSH to connect to it.

Note: If this is the first time adding remote nodes. It is suggested to review the Rundeck Tutorial before adding remote SSH nodes. This exercise assumes some experience with Linux, SSH Keys, and Rundeck basics covered in the Tutorial.


This documentation is for use with the Welcome Projectsopen in new window on non-production instances. It is strongly recommended to follow best practices when generating, managing and configuring SSH keys and access. For detailed configuration of SSH use this documentation.

Configuring Rundeck

Rundeck can store the authentication keys necessary to authenticate to our Linux example host in Rundeck’s built-in Key Storage.

  1. Click on the System Menu (gear icon) and choose Key Storage. Key Storage Menu
  2. Click on the Add or Upload a Key button to create a New entry in the Rundeck Key Storage. Add Key Entry
  3. For Key Type select Private Key.
  4. Add Rundeck instance private key file content in Enter text. The key is located at /var/lib/rundeck/.ssh/id_rsa.
  5. In the Storage path field it’s possible to define specific subfolders for the keys if needed, for this example just leave it blank.
  6. In the Name textbox enter a key name that corresponds to the Rundeck host, in this example is just rundeck (now the Key Storage entry is keys/rundeck). Key Entry

Adding Nodes

Now, it’s time to add the remote node.

Included in Enterprise is the Node Wizard Node Source. Use that to add a new node by following these steps:

  1. Click Project Settings | Edit Nodes
    Key Entry
  2. Click the Modify button under the Node Wizard entry.
    Modify Button
  3. Click + Add Node.
    Add Node
  4. Set the Node Name to node1
  5. Set HostName to node1
  6. Set OS Family to Unix
    Wizard Entry
  7. Click the Authentication Tab at the top.
  8. Enter agent for the UserName.

    Authentication Tab
  9. Click Add Node to save that node entry.
  10. Click the Save button under the list of nodes.
    Save Node Wizard

Running Commands on Nodes

Let’s dispatch some commands!

  1. Clicking on the "Nodes" tab (left menu) and using the drop-down to choose Select All Nodes will display all the nodes that have been configured. The screenshot below shows the listing with 2 nodes (the Rundeck node and the node added recently).
    Two Nodes Shown
  2. To select the node created earlier, put the name in Nodes textbox; In this case, node1 and press Enter key, now the node is selected.
    Filter for one node
  3. In the Enter a command textbox put a command, e.g.: df, and click on the Run on 1 Node green button.
    Command Output

Congratulations! A remote SSH node to dispatch commands and jobs is setup in Rundeck. Stay tuned to the next blog entry where we build a job to execute on this Node.

Additional Resources

ssh-keygen command documentationopen in new window