0

I using for i in <ip1> <ip2> ... <ipn>; do ssh pi@$ip sudo halt; done to turn off multiple raspberry pi. But i don't want iput password one by one for a lot of raspberry pi. So what should I do that?

1 Answers1

1

This question is not Raspberry-specific.

Read up ssh key-based authentication as put e.g. here

As soon you have the shared key created and copied it onto the target hosts (simplest method: use ssh-copy-id), you can start an ssh agent on the coordinating host (e.g. in its .profile or .xinitrc) and only need to type the key password once per session with ssh-add.

Or use passwordless keys.

Janka
  • 1,736
  • 9
  • 11