In this step, we would setup ssh connection between workstation node and cluster machines.
- Go to workstation (bm-wkst) node and type the following command to create authentication pairs for SSH.
> ssh-keygen -t rsa
Don’t enter any passphrase during regenerating the keys.
- Go to control panel node (bm-cp) node and enable ssh access for root login. Follow the steps and enter the command below as highlighted in bold below
mach@bw-cp:~$ sudo su
Retype new password:
passwd: password updated successfully
Note down the above password, as you would need this to login to the bm-cp node
from bm-wkst node.
- Next, edit the ssh_config to allow root login and password authentication.
root@bw-cp:/home/…# nano /etc/ssh/sshd_config
Uncomment the fields –
PermitRootLogin and PasswordAuthentication and provide value as yes as shown
Save the file.
- On the command prompt, restart the ssh service.
root@bw-node1: service sshd restart
- Now, go to bm-wkst node and execute the ssh-copy-id command to copy the public key from bw-wkst to bm-cp node.
mach@bw-wkst: ssh-copy-id -i ~/.ssh/id_rsa email@example.com
Replace 10.0.0.3 by internal ip address of your bm-cp node. (Get the internal ip address from Google Cloud VM console.)
For step by step details, please refer to YouTube video.
- Similarly, enable ssh access for root login on bm-node1 and bm-node 2 nodes and copy the public key from bm-wkst to both the nodes.