Rate This Document
Findability
Accuracy
Completeness
Readability

Setting SSH Password-Free Login

Setting SSH password-free login to simplify communication between nodes. Perform the operations in this section on all nodes.

To configure SSH password-free login on each node, perform the following steps:

  1. Generate SSH keys on each server node.

    Run the following command on the master and segment nodes:

    ssh-keygen -t rsa
  2. Exchange keys.

    Copy the public keys (stored in ~/.ssh/id_rsa.pub) of the master and segment nodes to the ~/.ssh/authorized_keys file on all other nodes. Perform this step on each node to ensure that the public key of each node is copied to the ~/.ssh/authorized_keys file on all other nodes.

    Run the following command on the master and segment nodes:

    ssh-copy-id gp-mdw
    ssh-copy-id gp-sdw

    The preceding command can exchange keys in one-click. If it does not work, you need to manually copy the keys to other nodes.

  3. Verify password-free login.
    1. On each node, update the shell environment of the current user to ensure that the SSH configuration is correctly loaded.
      source ~/.bash_profile
    2. On the master node, verify whether the SSH keys are successfully exchanged:
      gpssh-exkeys -f /data/gpdb/all_hosts

      If no error is reported, the setting is successful.