clustershell icon indicating copy to clipboard operation
clustershell copied to clipboard

Permission denied (publickey,password) problem

Open potant opened this issue 6 years ago • 3 comments

as root, the first of the following works and the second no:

  1. clush -w node-10 uptime node-10: 12:12:45 up 21 days, 23:27, 0 users, load average: 21.04, 21.01, 21.00
  2. clush --user someuser -w node-10 uptime node-10: Permission denied (publickey,password). clush: node-10: exited with exit code 255

/etc/clustershell/clush.conf is the default one

potant avatar Dec 12 '19 10:12 potant

You don't have permission to connect to node-10 as someuser. Please verify:

ssh -oBatchMode=yes someuser@node-10 uptime

And:

clush -v -d --user someuser -w node-10 uptime

degremont avatar Dec 12 '19 10:12 degremont

Yes i verified it. And if i make ssh someuser@node-10, it prompts me for password giving. So, clush works only with -oBatchMode=yes? If yes, then key-based authentication must me enabled so that clush doesnt give permission error? Thanks

potant avatar Dec 12 '19 12:12 potant

key-based authentication must me enabled so that clush doesnt give permission error?

You're right. Any password-less methods supported by SSH could be used (ticket based like Kerberos, Munge, Asymetric Keys, ...)

About password based authentication, there is an example to workaround this behaviour using sshpass: https://github.com/cea-hpc/clustershell/blob/master/conf/clush.conf#L21

If you really need a password authentication, there is a ticket #198 you can track to know when the feature will be implemented. This is not under active development at the moment.

degremont avatar Dec 12 '19 13:12 degremont

With clustershell 1.9, you should be able to use the new sshpass clush mode (provided as an example) to use password based authentication:

# enable sshpass mode
cp /etc/clustershell/clush.conf.d/sshpass.conf.example /etc/clustershell/clush.conf.d/sshpass.conf
# your example
clush -m sshpass --user someuser -w node-10 uptime

thiell avatar Nov 23 '22 17:11 thiell