sshconnectivity script does not work with password containing "["

sshconnectivity script does not work with password containing "["

I'm trying to install intel cluster studio. To generate the proper ssh connectivity between the nodes of my cluster, I'm using the sshconnectivity tool, as suggested in the installation instructions.

Why does the script keep telling me that "Error - The two entries for the cluster password do not match."? I've narrowed the problem to the square bracket that is in my password. If I run the script and just use the single character [ as my password, the script says that the entries do not mach. What gives???

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

As you haven't given any context, my guess would be that you must escape or quote your password or that charcter within it, so as to stop a shell from performing replacements.

Thank you for your suggetion Tim. I apologise for the lack of context. What I am trying to accomplish is to install Intel Cluster Studio 2011 on my small linux cluster containing 16 nodes. In Intel's installation instructions, I am told to run the script "sshconnectivity.exp" as follows:

./sshconnectivity.exp machines.LINUX

where the "machines.LINUX" file contains the names of each node, as reported by the "hostname" command. According to the install instructions, this is what the script does:

script sshconnectivity.exp will call the appropriate secure shell utilities to
generate a private key and a public key for each node of the cluster.

The first thing the script does is prompt for your user password twice. It asks:

Enter your user password:

Re-enter your user password:

My password contains the square bracket character [. After entering it twice, the script generates an error telling me the entries do not match. This is the output:

Enter your user password: **********
Re-enter your user password: **********
spawn /bin/sh
Error - The two entries for the cluster password do not match.

Through trial and error, and some luck, I discovered that the problem is the square bracket. If I enter the single character [ as my password, I still get the error. If I enter something else, like {, I don't get an error (but then obviously the script fails at logging into the nodes).

I am not sure how to implement your suggestion, as anything I type will be interpreted as being part of my password.

I've looked through the sshconnectivity script, written in the TCL language I believe. It stores both password entries in the strings cluster_password and cluster_password2. It then compares both these strings on line 189:

    188 # Do the two password strings match?
    189 if {[string match $cluster_password $cluster_password2]} {

I've tried hardcoding the passwords (which requires a backslash before special characters---"[" will be entered as "\["), and this still does not work. I outputted the strings cluster_password and cluster_password2 by inserting a couple of send_error statements after line 436:

    } else {
        send_error "Error - The two entries for the cluster password do not match.n"
        send_error "$cluster_passwordn"
        send_error "$cluster_password2n"

The passwords do match. They match when entered from terminal, or hardcoded, so there is a bug with the string comparison. I don't know how to change it so that it ignores special characters in the $cluster_password and $cluster_password2 strings.

As a workaround, I'll just comment out the if-else statement.

Well this is quite dissapointing. The sshconnectivity script provided by intel does not work. Not only did it not ensure that the known_hosts file was appropriately updated on each node, it also failed to make each node be able to log into each other node via ssh.

For example, I can go from node0 --> to node8 without a password. However, I can't go from node8 --> node15.

Leave a Comment

Please sign in to add a comment. Not a member? Join today