0

the follwing pssh command do a parallel as date

pssh -i -H "master01 master02 master03 worker01 worker02"  -l root -x '-q -o StrictHostKeyChecking=no -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o PubkeyAuthentication=yes' date | grep -v "^\["
Fri Jul 12 12:37:35 UTC 2019
Fri Jul 12 12:37:35 UTC 2019
Fri Jul 12 12:37:35 UTC 2019
Fri Jul 12 12:37:35 UTC 2019
Fri Jul 12 12:37:35 UTC 2019

but we notice that the password for the machines not defined so how pssh do the ssh activities without password ?

3
  • Can you provided more information on how your SSH server is configured? Commented Jul 12, 2019 at 12:46
  • some of the servers have the public keys and some no , the servers that no have public keys return to pssh the right value , so pssh can works with servers that public keys was sent and servers without public keys Commented Jul 12, 2019 at 12:51
  • Do you know if server is configured as keyless ssh? Commented Jul 12, 2019 at 13:13

1 Answer 1

0

Your pcommand sets the ssh option PubkeyAuthentication=yes. This means it will use a key pair to log in instead of passwords. The private key is on the machine where you run this. Check whether the private key is encrypted and compare the printed public key with the file /root/.ssh/authorized_keys on the remote machines.

$ ssh-keygen -y -f $HOME/.ssh/id_rsa
  • If ssh-keygen doesn't prompt you for a passphrase, then your private key is not encrypted. Rather learn how to use ssh-agent and encrypt your private key. Otherwise anyone with that file can login as root on your machines!
$ ssh-keygen -p -f $HOME/.ssh/id_rsa

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.