How do I copy SSH keys to P1-P4 when using usbboot/rpiboot?

Since the filesystems for P1-P4 are stored on the Controller it's even easier to setup SSH keys to log into the Pi Zeros without using a password from the Controller.

ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
mkdir -p /var/lib/clusterhat/nfs/p{1,2,3,4}/home/pi/.ssh/
cat ~/.ssh/ >> /var/lib/clusterhat/nfs/p1/home/pi/.ssh/authorized_keys
cat ~/.ssh/ >> /var/lib/clusterhat/nfs/p2/home/pi/.ssh/authorized_keys
cat ~/.ssh/ >> /var/lib/clusterhat/nfs/p3/home/pi/.ssh/authorized_keys
cat ~/.ssh/ >> /var/lib/clusterhat/nfs/p4/home/pi/.ssh/authorized_keys

You should now be able to log into the Pi Zeros.

Tags: cluster hat, clusterhat, keyless, pi zero, ssh
Last update:
2017-08-05 23:31
Chris Burton
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.