Step 4: Add the Amazon Redshift Cluster Public Key to Each Amazon EC2 Host's Authorized Keys File
You add the cluster public key to each host's authorized keys file for all of the Amazon EMR cluster nodes so that the hosts will recognize Amazon Redshift and accept the SSH connection.
To add the Amazon Redshift cluster public key to the host's authorized keys file
Access the host using an SSH connection.
For information about connecting to an instance using SSH, see Connect to Your Instance in the Amazon EC2 User Guide.
Copy the Amazon Redshift public key from the console or from the CLI response text.
Copy and paste the contents of the public key into the
/home/<ssh_username>/.ssh/authorized_keysfile on the host. Include the complete string, including the prefix "
ssh-rsa" and suffix "
Amazon-Redshift". For example:Copy
ssh-rsa AAAACTP3isxgGzVWoIWpbVvRCOzYdVifMrh… uA70BnMHCaMiRdmvsDOedZDOedZ Amazon-Redshift