#! /bin/bash ## ssh_wo_passwd_to_all_PCs_for_cluster_wo_internet ## This script is relevant when setting up a clustered PC that are linked via a switch without a node connected to internet. ## Instruction. This script is to be found in http://10.205.19.205/configrepo/howto/linux/passwordless_ssh_wo_internet_for_cluster/ ## To make use of this script, download the following files (this script included) into a folder in a pendrive, say /passwdless_ssh. Copy the folder from pendrive to the home directory of an existing user e.g. /home/common of each nodes. # Execute ssh_wo_passwd_to_all_PCs_for_cluster_wo_internet in the home directory of an existing user e.g. /home/common/passwdless_ssh. ## Passwordless ssh will be established among the frontend and nodes for the user of which this script is being executed. Say if you execute this script in /home/common/passwdless_ssh in the home directory of the user common, then the user common will be able to ssh passwordlessly. Other users will not enjoy this benefit unless you run script as that user in their home directory. mv ~/.bashrc ~/.bashrc.orig mv bashrc ~/.bashrc . /home/common/.bashrc chmod +x ssh-copy-cluster chmod +x ssh-agen ssh-keygen -t rsa; ./ssh-copy-cluster ## In case this script fails to establish a passwordless ssh among the PC, try ./ssh-agen and then ./ssh-copy-cluster again. The files ssh-copy-cluster and ssh-agen will be downloaded automatically to the same folder containing this script when it is executed.