简体   繁体   中英

Rundeck ssh: Failed: AuthenticationFailure: Authentication failure connecting to node:

I'm testing rundeck 3.3.0 from Docker 1.13.1 on a RHEL 7.7

I have the following node:

  oc3583155071  keys/local/root     password    
    Operating System    Linux
    ssh-authentication: password 
    sudo-command-enabled:   true 
    sudo-password-storage-path: keys/local/root

and these are its key storage:

  keys/local

  2 keys
    neslarra  Password
    root      Password             <<<<<<==============

    Storage path: keys/local/root 
    Created: 5:27 pm by: admin

I tested the ssh connection from rundeck shell and it works OK:

  rundeck@9ce08386edcd:~$ ssh root@oc3583155071
  root@oc3583155071's password: 
  [root@oc3583155071 ~]# uname -n; whoami
  oc3583155071
  root
  [root@oc3583155071 ~]#

BUT, when I try to exec a command from the runeck GUI it retunrs this error:

  Nodes   oc3583155071
  Recent: uname -n; whoami
   
  >  uname -n; whoami #28 
  Failed: AuthenticationFailure: Authentication failure connecting to node: "oc3583155071". Could not authenticate.
  Execution failed: 28 in project Test1: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [oc3583155071: AuthenticationFailure: Authentication failure connecting to node: "oc3583155071". Could not authenticate. + {dataContext=MultiDataContextImpl(map={ContextView(node:oc3583155071)=BaseDataContext{{exec={exitCode=-1}}}, ContextView(step:1, node:oc3583155071)=BaseDataContext{{exec={exitCode=-1}}}}, base=null)} ]}, Node failures: {oc3583155071=[AuthenticationFailure: Authentication failure connecting to node: "oc3583155071". Could not authenticate. + {dataContext=MultiDataContextImpl(map={ContextView(node:oc3583155071)=BaseDataContext{{exec={exitCode=-1}}}, ContextView(step:1, node:oc3583155071)=BaseDataContext{{exec={exitCode=-1}}}}, base=null)} ]}, status: failed]

Help will be appreciate (a lot..!). Nestor.

You need to configure your ssh target node and set up correctly on the Rundeck's node source, your node definition needs more attributes, I leave these steps to configure from scratch:

  1. Make sure that your target ssh config admits password login (enable PasswordAuthentication yes on the /etc/ssh/sshd_config config file and restart the sshd service: systemctl restart sshd ).

  2. On the Rundeck side create a password key to reference it later in the resources.xml file ( ssh-password-storage-path attribute).

  3. On Rundeck side, make sure that you're using a well-configured node definition . I used the following resources.xml content example:

<?xml version="1.0" encoding="UTF-8"?>
<project>
 <node name="remote" description="remote ssh node" osFamily="unix" username="vagrant" hostname="192.168.33.20" ssh-authentication="password" ssh-password-storage-path="keys/sshpasswd" />
</project>
  1. Test sending any command to your new node, on Rundeck GUI, go to "Commands" (Left menu) and select your node on "Nodes" textbox (using name: <your-node-name> ) and send any command ("Enter a command" textbox), you must see the result.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM