Adding slave in PVM asks for password
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
When using PVM (Parallel Virtual Machine), a tool that allows a collection of computers connected by a network to function as a coherent and flexible concurrent computational resource, you may encounter situations where adding a slave node prompts for a password. This behavior can interrupt the seamless deployment and orchestration of tasks within the PVM environment. This article discusses why this happens and how to manage such scenarios effectively.
Understanding PVM and Node Authentication
PVM allows multiple computers (or nodes) to collaborate on a problem by splitting the task into smaller parts, which are then computed in parallel. To incorporate a new machine into the PVM console or environment, the master node needs to communicate with the slave nodes.
The interaction between the master and slave nodes often involves SSH (Secure Shell), a protocol used to manage machines over a network securely. When a master node tries to communicate with a slave node to include it in the PVM system, SSH is tasked with establishing a secure and trusted connection. If the slave node's SSH configuration requires a password for authentication, you will be prompted to enter it upon trying to add the slave.
Why Password Prompts Occur
The necessity for a password prompt primarily stems from the security policies set on the slave's SSH server. Here's what typically causes password prompts when adding a slave node:
- Default SSH Configuration: In many systems, SSH is configured to authenticate users by asking for a username and password.
- Public Key Not Configured: For password-less access, SSH supports key-based authentication. Lack of a properly configured public-private key pair between the master and slave nodes can result in fallback to password authentication.
- Strict Security Policies: Some organizations enforce password-only authentication for added security, which necessitates entering passwords manually when establishing connections.
Setting Up Password-less SSH
To streamline the process of adding slave nodes in PVM without having to input passwords, setting up SSH for password-less login is often recommended. Here is a step-by-step guide on how to configure this:
- Generate SSH Key: On the master node, generate a new SSH key pair using the command:
This command creates a private key and a public key. The private key stays with the master, and the public key will be shared with the slaves.
- Copy the SSH Public Key: Transfer the public key to each slave node. The
ssh-copy-idutility can automate this process:
Replace username@slave_node with the appropriate user and IP address or hostname of the slave node.
- Configure SSH: Ensure that the SSH configuration on both master and slave nodes is optimized for key-based authentication. Check the
/etc/ssh/ssh_configand/etc/ssh/sshd_configfiles for directives that might disable key-based authentication such asPubkeyAuthentication no. - Test SSH Connection: Verify that you can SSH from the master to the slave node without being prompted for a password:
Automating PVM Node Addition Process
After configuring SSH, automating the node addition process in PVM can be achieved using scripts or configuration management tools. A simple script might loop through a list of node names or IP addresses, adding each to the PVM setup by invoking PVM commands or system commands to manipulate the PVM host file and restart the PVM if necessary.
Summary Table
| Issue | Cause | Solution |
| Password Prompt | Default SSH settings require password | Set up SSH key-based authentication |
| Manual Addition | Repetitive process for each slave | Automate using scripts or tools |
| Security Concerns | Public keys can be perceived as less secure | Ensure correct permissions on keys and limit access |
In conclusion, encountering a password prompt when adding a slave node to PVM is often a result of SSH configuration that defaults to password authentication. By setting up SSH to use key-based authentication and potentially automating the node addition process, one can reduce the friction in managing a flexible, distributed computational environment with PVM.

