#! /bin/bash ## This is a follow-up script for http://www2.fizik.usm.my/configrepo/howto/linux/ssh_wo_passwd_to_all_PCs_for_cluster ## Make sure that the intended nodes has already a folder $HOME/.ssh/ before the pub key is copied there. ssh 10.1.1.1 mkdir -p .ssh ssh 10.1.255.231 mkdir -p .ssh ssh 10.1.255.232 mkdir -p .ssh ssh 10.1.255.233 mkdir -p .ssh ssh 10.1.255.234 mkdir -p .ssh ssh 10.1.255.235 mkdir -p .ssh ssh 10.1.255.236 mkdir -p .ssh ssh 10.1.255.237 mkdir -p .ssh ssh-copy-id -i ~/.ssh/id_rsa.pub 10.1.1.1 ssh-copy-id -i ~/.ssh/id_rsa.pub 10.1.255.231 ssh-copy-id -i ~/.ssh/id_rsa.pub 10.1.255.232 ssh-copy-id -i ~/.ssh/id_rsa.pub 10.1.255.233 ssh-copy-id -i ~/.ssh/id_rsa.pub 10.1.255.234 ssh-copy-id -i ~/.ssh/id_rsa.pub 10.1.255.235 ssh-copy-id -i ~/.ssh/id_rsa.pub 10.1.255.236 ssh-copy-id -i ~/.ssh/id_rsa.pub 10.1.255.237