1
votes

I am trying to run SSH Commands using Oozie Workflow.xml

Workflow.xml

<action name="mysshjob">
    <ssh xmlns="uri:oozie:ssh-action:0.1">
        <host>XXX.XX.XX.XXX</host>
        <command>cp</command>
        <args>a.txt</args>
        <args>b.txt</args>
    </ssh>
    <ok to="pig-node"/>
    <error to="fail"/>
</action>

Getting this Error:

AUTH_FAILED: Not able to perform operation [ssh -o PasswordAuthentication=no -o KbdInteractiveDevices=no -o StrictHostKeyChecking=no -o ConnectTimeout=20 [email protected] mkdir -p oozie-oozi/0000067-130808155814753-oozie-oozi-W/mysshjob--ssh/ ] | ErrorStream: Permission denied (publickey,password).

But When i schedule pig scripts using workflow, those are working fine. Using CDH4.3 oozie component.

Regard,

Bhagwant Bhobe

2

2 Answers

0
votes

Try passphrase-less ssh setup as described here: http://oozie.apache.org/docs/3.3.2/ENG_Building.html

0
votes

SNeumann gave the correct solution, this is a very tricky problem and I could only hack it. For me the issue was following failed ( I could see in logs )

ssh -o PasswordAuthentication=no -o KbdInteractiveDevices=no -o StrictHostKeyChecking=no -o ConnectTimeout=20 [email protected] mkdir -p oozie-oozi/0000067-130808155814753-oozie-oozi-W/mysshjob--ssh/

But if tried the same command but removed KbdInteractiveDevices=no or changed KbdInteractiveDevices=pam it worked

ssh -o PasswordAuthentication=no -o KbdInteractiveDevices=pam -o StrictHostKeyChecking=no -o ConnectTimeout=20 [email protected] mkdir -p oozie-oozi/0000067-130808155814753-oozie-oozi-W/mysshjob--ssh/

Anyway I think there was some issue with old ssh key so I tried following and it works

$ ssh-keygen -t dsa
$ cat ~/.ssh/id_dsa.pub > ~/.ssh/authorized_keys2