Add a remote node in rundeck

后端 未结 3 1285
别那么骄傲
别那么骄傲 2020-12-15 14:00

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 an

3条回答
  •  不思量自难忘°
    2020-12-15 14:51

    Rundeck host server connects to the node by means of private key authentication which is exactly similar to SSH private key authentication. Follow these steps to add a node to your server rundeck.

    Open up the resources.xml file and add the following.

    
    

    You can change the SSH user name in node and private key file name. In addition to that, you can change all the other naming parameters too like node name and tags etc.

    Now get into your node server.

    1. Create a ssh user, here its leo
    2. switch to user leo. Generate a SSH key
    3. ssh-keygen
    4. Append the public key to authorized_keys
    5. leo@c1a5f48a6c4c:~/.ssh$ pwd /home/leo/.ssh leo@c1a5f48a6c4c:~/.ssh$ cat id_rsa.pub >> authorized_keys leo@c1a5f48a6c4c:~/.ssh$ chmod g-w authorized_keys
    6. Copy the private key
    7. leo@c1a5f48a6c4c:~/.ssh$ cat id_rsa

    Save the private key to the file "/var/lib/rundeck/node2.key" on rundeck host. Now the authentication is okay and ready to execute adhoc commands from rundeck dashboard

提交回复
热议问题