SSH data source

更新时间:
复制 MD 格式

An SSH data source lets DataWorks remotely access a host and run scripts through SSH nodes. For example, you can remotely access an Elastic Compute Service (ECS) instance from DataWorks and periodically run scripts on the instance.

Limitations

  • You can create an SSH data source only in connection string mode.

  • You can use only an exclusive resource group for scheduling to run SSH tasks. You must submit a ticket to contact technical support for an upgrade. Otherwise, tasks may fail to run.

Usage notes

If you use a standard mode workspace, you must create data sources for the development environment and production environment separately. The data sources for both environments must use the same authentication mode.

Prerequisites

  • You have obtained the host address and port of the server.

  • You have purchased and configured an exclusive resource group for scheduling.

    After you create an SSH data source, you can use only an exclusive resource group for scheduling to develop and schedule computing tasks. You must prepare a resource group in advance and ensure network connectivity between the data source and the resource group. For more information, see Use an exclusive resource group for scheduling and Network connectivity solutions.

Permissions

To create a data source as a RAM user or by using a RAM role, the user or role must have one of the following permissions:

Access the Data Source page

    1. Log on to the DataWorks console. In the target region, click More > Management Center in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Management Center.

    2. On the Workspace Management page, click Data Sources in the left-side navigation pane to open the data source page.

  1. Click Add Data Source and then select SSH.

Create a data source

On the Create SSH Data Source page, configure basic information and test network connectivity.

  1. Configure basic information.

    Note

    If you use a standard mode workspace, you must create data sources for the development environment and production environment separately. The data sources for both environments must use the same authentication mode.

    Key parameters:

    • Configuration Mode: You can create an SSH data source only in User-created Data Store with Public IP Addresses.

    • Authentication Mode:

      Host password authentication

      Parameter

      Description

      Host Address

      The host address of the SSH server.

      Host Port

      The port number of the SSH server.

      Username

      The username used to log on to the SSH server.

      Password

      The password for the specified username.

      Host SSH key authentication

      Parameter

      Description

      Host Address

      The host address of the SSH server.

      Host Port

      The port number of the SSH server.

      Username

      The username used to log on to the SSH server.

      Private key

      The private key used to log on to the SSH server. You must upload the key as a required authentication file. For details about how to manage authentication files, see Manage third-party authentication files.

      Private Key Passphrase

      If the private key file is encrypted, enter its passphrase.

      (Recommended) DataWorks SSH public key

      DataWorks generates a key pair for the SSH data source and provides the public key. Add this key to your server to establish a connection. This method is more secure than password or private key authentication.

      Parameter

      Description

      Host Address

      The host address of the SSH server.

      Host Port

      The port number of the SSH server.

      Username

      The username used to log on to the SSH server.

      Public Key

      Click Generate Key Pair. The platform generates a public key. Before you test the connection, add the public key to the .ssh/authorized_keys file on the host.

      Note
      • The generated key pair takes effect after the data source is created. Add the public key to your host promptly.

      • When you edit the data source, a new public key is generated each time you click Generate Key Pair. After you save the configuration, the original public key becomes invalid. This action may cause running tasks to fail. Perform this action with caution.

  2. Test the resource group connectivity.

    In the Connection Configuration section, test the connection from the exclusive resource group for scheduling to the data source. Tasks fail if the resource group cannot reach the data source. Ensure the resource group can access your host. For more information, see Network connectivity solutions.

    Note
    • You can use only an exclusive resource group for scheduling to run SSH tasks. You must submit a ticket to contact technical support for an upgrade. Otherwise, tasks may fail to run.

    • If the connection fails, add the IP address of the resource group to the inbound rules of the security group for the server instance and try again.

Next steps

After you create the data source:

  • Develop and schedule computing tasks:

    In DataStudio, specify the SSH data source in an SSH node to connect to the configured host. You can then publish the node to the production environment to periodically run its code. DataStudio and Operation Center in DataWorks support developing and scheduling SSH tasks.

  • Manage the data source: Go to the Data Source page in SettingCenter to edit or delete the data source.

Related documents

For information about load balancing and high availability for SSH nodes, see Implement load balancing and high availability for SSH nodes.