Transferring data to a remote host by using SSH key pairs for authentication

You can archive and export results, archive data, and export data marts with SSH key pairs for authentication, instead of usernames and passwords.

Before you begin

Ensure that:
  • If you are adding an SSH key pair to a data mart, the data mart is defined.
  • The SSH key feature is enabled.
  • The SSH key pairs were generated.
  • The public part of the key, public-transfer-key, was copied to the remote host.
For more information, see Enabling SSH key pairs for data archive, data export, data mart.

About this task

These grdapi commands have a new parameter, ssh_keys_active. When ssh_keys_active=1, the system transfers data with the SSH key pairs, instead of a username and password. You can update an existing archive, export, or data mart by using these APIs.
  • grdapi configure_archive
  • grdapi datamart_update_copy_file_info
  • grdapi datamart_validate_copy_file_info
  • grdapi configure_results_archive
  • grdapi configure_results_export
You can also configure a new results archive, results export, and data archive, by using the relevant APIs.

The user and password details that are defined in the Data Archive, Results Archive, and Results Export pages are still valid after you define SSH key pairs. They function as a backup to the SSH key authentication. The UI does not show that you defined SSH key pairs.

Procedure

Run any of the APIs with the parameter ssh_keys_active. For example,
  • grdapi configure_archive archiveOlderThan=1 archiveValues=1 destHost=“n.n.n.n” ignoreOlderThan=30 protocol=“scp” targetDir=“/var/tmp” userName=“root” ssh_keys_active=1
  • grdapi datamart_update_copy_file_info destinationHost=“n.n.n.n”destinationPath=“/var/tmp/” destinationUser=“root” transferMethod=“SCP” Name=“Export:Full SQL” ssh_keys_active=1
  • grdapi datamart_validate_copy_file_info destinationHost=“n.n.n.n” destinationPath=“/var/tmp/” destinationUser=“root” transferMethod=“SCP” ssh_keys_active=1
  • grdapi configure_results_archive archiveOlderThan=1 archiveValues=1 destHost=“n.n.n.n” ignoreOlderThan=30 protocol=“scp” targetDir=“/var/tmp” userName=“root” ssh_keys_active=1
  • grdapi configure_results_export destHost=“n.n.n.n” protocol=“scp” targetDir=“/var/tmp” userName=“root” port=22 ssh_keys_active=1