Rundeck 2.6.4-1 Getting Authentication failure connecting to node: Password incorrect, for privateKey authentication

1,897 views
Skip to first unread message

Manoj Vivek

unread,
Mar 29, 2016, 8:46:49 AM3/29/16
to rundeck-discuss
I have recently setup Rundeck and tried to run a basic script on node 'chef-web02' but getting following error. But I can run the same from the shell in rundeck-node as 'rundeck' user(Attached the output below). 
I have used "root" user for scp on the remote node and I have overridden the same with mapping params as "username.default=root". It is using the correct ssh port and username but not working. 
Appreciate any help on this.

Rundeck Debug output:
10:30:02 1. Script[workflow] Begin step: 1,NodeDispatch
10:30:021: Workflow step executing: com.dtolabs.rundeck.execution.ExecutionItemFactory$1@f4915b2
10:30:02preparing for sequential execution on 1 nodes
10:30:02Executing command on node: Chef-Web02, NodeEntryImpl{tags=[ec2, running], attributes={tags=ec2, osFamily=unix, osArch=x86_64, state=running, instanceId=i-6bac8fe8, editUrl=https://console.aws.amazon.com/ec2/home#Instances:search=${node.instanceId}, hostname=, privateDnsName=ip-172-30-0-32.ec2.internal, sshport=22, privateIpAddress=172.30.0.32, username=root, description=EC2 node instance, nodename=Chef-Web02, osName=Linux}, project='null'}
10:30:02Chef-Web02 1. Script[workflow] beginExecuteNodeStep(Chef-Web02): NodeDispatch: com.dtolabs.rundeck.execution.ExecutionItemFactory$1@f4915b2
10:30:02Using ssh keyfile: /var/lib/rundeck/.ssh/id_rsa
10:30:02copying file: '/var/lib/rundeck/var/tmp/dispatch5945500361857490942.tmp' to: 'Chef-Web02:/tmp/4-22-Chef-Web02-dispatch-script.tmp.sh'
10:30:02Using private key file: /var/lib/rundeck/.ssh/id_rsa
10:30:02Set timeout to 0
10:30:02Connecting to :22
10:30:02Connecting to port 22
10:30:02Connection established
10:30:02Remote version string: SSH-2.0-OpenSSH_6.6.1
10:30:02Local version string: SSH-2.0-JSCH-0.1.52
10:30:02CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
10:30:02CheckKexes: diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
10:30:03ecdh-sha2-nistp256 is not available.
10:30:03ecdh-sha2-nistp384 is not available.
10:30:03ecdh-sha2-nistp521 is not available.
10:30:03CheckSignatures: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
10:30:03ecdsa-sha2-nistp256 is not available.
10:30:03ecdsa-sha2-nistp384 is not available.
10:30:03ecdsa-sha2-nistp521 is not available.
10:30:03SSH_MSG_KEXINIT sent
10:30:03SSH_MSG_KEXINIT received
10:30:03kex: server: curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
10:30:03kex: server: ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
10:30:03kex: server: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes12...@openssh.com,aes25...@openssh.com,chacha20...@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijnda...@lysator.liu.se
10:30:03kex: server: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes12...@openssh.com,aes25...@openssh.com,chacha20...@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijnda...@lysator.liu.se
10:30:03kex: server: hmac-m...@openssh.com,hmac-s...@openssh.com,umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-ripe...@openssh.com,hmac-sha...@openssh.com,hmac-md...@openssh.com,hmac-md5,hmac-sha1,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ri...@openssh.com,hmac-sha1-96,hmac-md5-96
10:30:03kex: server: hmac-m...@openssh.com,hmac-s...@openssh.com,umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-ripe...@openssh.com,hmac-sha...@openssh.com,hmac-md...@openssh.com,hmac-md5,hmac-sha1,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ri...@openssh.com,hmac-sha1-96,hmac-md5-96
10:30:03kex: server: none,zl...@openssh.com
10:30:03kex: server: none,zl...@openssh.com
10:30:03kex: server:
10:30:03kex: server:
10:30:03kex: client: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256
10:30:03kex: client: ssh-rsa,ssh-dss
10:30:03kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
10:30:03kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
10:30:03kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
10:30:03kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
10:30:03kex: client: none
10:30:03kex: client: none
10:30:03kex: client:
10:30:03kex: client:
10:30:03kex: server->client aes128-ctr hmac-md5 none
10:30:03kex: client->server aes128-ctr hmac-md5 none
10:30:03SSH_MSG_KEXDH_INIT sent
10:30:03expecting SSH_MSG_KEXDH_REPLY
10:30:03ssh_rsa_verify: signature true
10:30:03Permanently added '' (RSA) to the list of known hosts.
10:30:03SSH_MSG_NEWKEYS sent
10:30:03SSH_MSG_NEWKEYS received
10:30:03SSH_MSG_SERVICE_REQUEST sent
10:30:03SSH_MSG_SERVICE_ACCEPT received
10:30:03Authentications that can continue: publickey,password,keyboard-interactive
10:30:03Next authentication method: publickey
10:30:03Disconnecting from port 22
10:30:03Authentication failure connecting to node: "Chef-Web02". Password incorrect.
10:30:03localhost 1. Script[workflow] finishExecuteNodeStep(Chef-Web02): NodeDispatch: AuthenticationFailure: [jsch-scp] Failed copying the file: Authentication failure connecting to node: "Chef-Web02". Password incorrect.
10:30:03Failed dispatching to node Chef-Web02: [jsch-scp] Failed copying the file: Authentication failure connecting to node: "Chef-Web02". Password incorrect.
10:30:03Failed dispatching to node Chef-Web02: com.dtolabs.rundeck.core.execution.workflow.steps.node.NodeStepException: [jsch-scp] Failed copying the file: Authentication failure connecting to node: "Chef-Web02". Password incorrect. at com.dtolabs.rundeck.core.execution.workflow.steps.node.impl.ScriptFileNodeStepExecutor.executeScriptFile(ScriptFileNodeStepExecutor.java:151) at com.dtolabs.rundeck.core.execution.workflow.steps.node.impl.ScriptFileNodeStepExecutor.executeNodeStep(ScriptFileNodeStepExecutor.java:69) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeNodeStep(ExecutionServiceImpl.java:149) at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:116) at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:58) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.dispatchToNodes(ExecutionServiceImpl.java:177) at com.dtolabs.rundeck.core.execution.workflow.steps.NodeDispatchStepExecutor.executeWorkflowStep(NodeDispatchStepExecutor.java:66) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeStep(ExecutionServiceImpl.java:116) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWFItem(BaseWorkflowStrategy.java:225) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflowItemsForNodeSet(BaseWorkflowStrategy.java:303) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflowItemsForNodeSet(BaseWorkflowStrategy.java:258) at com.dtolabs.rundeck.core.execution.workflow.StepFirstWorkflowStrategy.executeWorkflowImpl(StepFirstWorkflowStrategy.java:79) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflow(BaseWorkflowStrategy.java:182) at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy$DispatchedWorkflow.dispatch(NodeFirstWorkflowStrategy.java:383) at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:118) at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:64) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.dispatchToNodes(ExecutionServiceImpl.java:196) at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy.executeWFSectionNodeDispatch(NodeFirstWorkflowStrategy.java:189) at com.dtolabs.rundeck.core.execution.workflow.NodeFirstWorkflowStrategy.executeWorkflowImpl(NodeFirstWorkflowStrategy.java:110) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowStrategy.executeWorkflow(BaseWorkflowStrategy.java:182) at com.dtolabs.rundeck.core.execution.WorkflowExecutionServiceThread.run(WorkflowExecutionServiceThread.java:55) Caused by: com.dtolabs.rundeck.core.execution.service.FileCopierException: [jsch-scp] Failed copying the file: Authentication failure connecting to node: "Chef-Web02". Password incorrect. at com.dtolabs.rundeck.core.execution.impl.jsch.JschScpFileCopier.copyFile(JschScpFileCopier.java:182) at com.dtolabs.rundeck.core.execution.impl.jsch.JschScpFileCopier.copyFile(JschScpFileCopier.java:217) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.fileCopyFile(ExecutionServiceImpl.java:261) at com.dtolabs.rundeck.core.execution.workflow.steps.node.impl.ScriptFileNodeStepExecutor.executeScriptFile(ScriptFileNodeStepExecutor.java:140) ... 20 more Caused by: com.jcraft.jsch.JSchException: Auth fail at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:245) at com.dtolabs.rundeck.core.execution.impl.jsch.JschScpFileCopier.copyFile(JschScpFileCopier.java:173) ... 23 more Caused by: com.jcraft.jsch.JSchException: Auth fail at com.jcraft.jsch.Session.connect(Session.java:512) at com.jcraft.jsch.Session.connect(Session.java:183) at com.dtolabs.rundeck.core.tasks.net.SSHTaskBuilder.openSession(SSHTaskBuilder.java:171) at com.dtolabs.rundeck.core.tasks.net.ExtScp.openSession(ExtScp.java:33) at org.apache.tools.ant.taskdefs.optional.ssh.Scp.upload(Scp.java:324) at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:226) ... 24 more
10:30:03[workflow] Finish step: 1,NodeDispatch

SCP shell debug output:
[rundeck@ip-172-30-0-199 ec2-user]$ scp -v /var/lib/rundeck/var/tmp/file1 ro...@172.30.0.32:/tmp/1-18-Chef-Web02-dispatch-script.tmp1.sh
Executing: program /usr/bin/ssh host 172.30.0.32, user root, command scp -v -t /tmp/1-18-Chef-Web02-dispatch-script.tmp1.sh
OpenSSH_6.6.1, OpenSSL 1.0.1k-fips 8 Jan 2015
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug1: Connecting to 172.30.0.32 [172.30.0.32] port 22.
debug1: Connection established.
debug1: identity file /var/lib/rundeck/.ssh/id_rsa type 1
debug1: identity file /var/lib/rundeck/.ssh/id_rsa-cert type -1
debug1: identity file /var/lib/rundeck/.ssh/id_dsa type -1
debug1: identity file /var/lib/rundeck/.ssh/id_dsa-cert type -1
debug1: identity file /var/lib/rundeck/.ssh/id_ecdsa type -1
debug1: identity file /var/lib/rundeck/.ssh/id_ecdsa-cert type -1
debug1: identity file /var/lib/rundeck/.ssh/id_ed25519 type -1
debug1: identity file /var/lib/rundeck/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-m...@openssh.com none
debug1: kex: client->server aes128-ctr hmac-m...@openssh.com none
debug1: kex: ecdh-sha2-nistp256 need=16 dh_need=16
debug1: kex: ecdh-sha2-nistp256 need=16 dh_need=16
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA aa:34:5d:31:4f:23:05:c1:31:1b:3c:0b:57:94:96:83
debug1: Host '172.30.0.32' is known and matches the ECDSA host key.
debug1: Found key in /var/lib/rundeck/.ssh/known_hosts:2
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /var/lib/rundeck/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to 172.30.0.32 ([172.30.0.32]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-...@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LC_ALL = en_US.UTF-8
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LANGUAGE = en_US.UTF-8
debug1: Sending env LC_CTYPE = UTF-8
debug1: Sending command: scp -v -t /tmp/1-18-Chef-Web02-dispatch-script.tmp1.sh
Sending file modes: C0664 3908 /var/lib/rundeck/var/tmp/file1
Sink: C0664 3908 /var/lib/rundeck/var/tmp/file1
/var/lib/rundeck/var/tmp/file1                                                                                                                     100% 3908     3.8KB/s   00:00    
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Transferred: sent 7632, received 2568 bytes, in 0.0 seconds
Bytes per second: sent 648874.5, received 218332.0
debug1: Exit status 0 

Thanks,
Manoj Vivek 

Greg Schueler

unread,
Mar 29, 2016, 12:26:26 PM3/29/16
to rundeck...@googlegroups.com
It looks like the "hostname" for the node is not set

--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rundeck-discuss/739df3b9-708f-42e9-8215-40595f3d5563%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages